Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted by ers ( 12 years ago )
describe Policy do

  before(:all) do
     organizati
  end

  context 'ONE' do

    it 'test for ONE' do
        CoveragePolicy.count.should == 0

        ...
        CoveragePolicy.create!  <-- создается запись доступная во всех it

        CoveragePolicy.count.should == 1
    end

  end

  context 'TWO' do

    it 'test for TWO' do
        CoveragePolicy.count.should == 0  <-- падает    т.к. есть уже запись, созданная в 'test for ONE'  ( 1 != 0 )

        ...
        CoveragePolicy.save!

        CoveragePolicy.count.should == 1
    end

  end

end

 

Revise this Paste

Your Name: Code Language: