Skip to content

Instantly share code, notes, and snippets.

@gal-at-aljazeera
Created July 29, 2012 07:47
Show Gist options
  • Save gal-at-aljazeera/3196549 to your computer and use it in GitHub Desktop.
Save gal-at-aljazeera/3196549 to your computer and use it in GitHub Desktop.
rspec db pollution
[\ 21:28][~/projects/social-dashboard (master)]$ rake db:test:prepare
[\ 21:28][~/projects/social-dashboard (master)]$ RAILS_ENV=test rails runner "pp Status.all"
[]
[\ 21:28][~/projects/social-dashboard (master)]$ rspec spec/models/test_db_pollution_spec.rb
example with an exception
should be a status (FAILED - 1)
example with before :each
should be a status
Example with let!
should be a status
Example with let
should be a status
example with before :all
should be a status
Failures:
1) example with an exception should be a status
Failure/Error: raise "some exception!"
RuntimeError:
some exception!
# ./spec/models/test_db_pollution_spec.rb:36:in `block (2 levels) in <top (required)>'
Finished in 0.41701 seconds
5 examples, 1 failure
Failed examples:
rspec ./spec/models/test_db_pollution_spec.rb:34 # example with an exception should be a status
Randomized with seed 51742
[\ 21:28][~/projects/social-dashboard (master)]$ RAILS_ENV=test rails runner "pp Status.all"
[#<Status id: 5, tweet_id: "5", created_at: "2012-07-29 17:42:56", updated_at: "1989-12-17 20:05:00", stream_id: 7, screen_name: "test status from before :all", profile_image_url: "http://braun.tld/madie.emmerich", text: "5 #engage user-centric infrastructures @integrate o...", vote_count: 1>]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment