Sha256: 034d8071c889211518cbf3e0573a05a6c90403b9143512a97100308ab9d9d9d3

Contents?: true

Size: 662 Bytes

Versions: 59

Compression:

Stored size: 662 Bytes

Contents

require File.join(File.dirname(__FILE__), *%w[helper])

Story "transactions should rollback", %{
  As an RSpec/Rails Story author
  I want transactions to roll back between scenarios
  So that I can have confidence in the state of the database
}, :type => RailsStory do
  Scenario "add one Person" do
    When "I add a Person" do
      Person.create!(:name => "Foo")
    end
  end
  
  Scenario "add another person" do
    GivenScenario "add one Person"
    Then "there should be one person" do
      Person.count.should == 1
    end
  end

  Scenario "add yet another person" do
    GivenScenario "add one Person"
    Then "there should be one person"
  end
end

Version data entries

59 entries across 59 versions & 10 rubygems

Version Path
dchelimsky-rspec-rails-1.1.10 stories/transactions_should_rollback.rb
dchelimsky-rspec-rails-1.1.11.1 stories/transactions_should_rollback.rb
dchelimsky-rspec-rails-1.1.11 stories/transactions_should_rollback.rb
dchelimsky-rspec-rails-1.1.6 stories/transactions_should_rollback.rb
dchelimsky-rspec-rails-1.1.7 stories/transactions_should_rollback.rb
dchelimsky-rspec-rails-1.1.8 stories/transactions_should_rollback.rb
dchelimsky-rspec-rails-1.1.9 stories/transactions_should_rollback.rb
jcnetdev-rspec-rails-1.1.5 stories/transactions_should_rollback.rb
jnstq-acts_as_sms-0.1.0 test/vendor/plugins/rspec-rails/stories/transactions_should_rollback.rb
jnstq-acts_as_sms-0.1.1 test/vendor/plugins/rspec-rails/stories/transactions_should_rollback.rb
jnstq-acts_as_sms-0.1.3 test/vendor/plugins/rspec-rails/stories/transactions_should_rollback.rb
jnstq-acts_as_sms-0.1.4 test/vendor/plugins/rspec-rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-2.0.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-1.4.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-1.3.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-1.2.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-1.1.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-1.0.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-0.2.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb
jstorimer-deep-test-0.1.0 sample_rails_project/vendor/plugins/rspec_on_rails/stories/transactions_should_rollback.rb