Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'spec_helper'
- describe "transactions" do
- before :all do
- @device = Factory(:device)
- end
- it "has one device before a nested context" do
- Device.count.should == 1
- end
- describe "in a nested context" do
- before :all do
- @device2 = Factory(:device)
- end
- it "has two devices" do
- Device.count.should == 2
- end
- end
- describe "in another nested context" do
- before :all do
- @device2 = Factory(:device)
- end
- it "has two devices" do
- Device.count.should == 2
- end
- end
- it "has one device after a nested context" do
- Device.count.should == 1
- end
- end
- describe "another top-level example group" do
- it "has no devices" do
- Device.count.should == 0
- end
- end
Add Comment
Please, Sign In to add comment