Skip to content

Instantly share code, notes, and snippets.

@aruprakshit
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aruprakshit/de3346587199b49c55a9 to your computer and use it in GitHub Desktop.
Save aruprakshit/de3346587199b49c55a9 to your computer and use it in GitHub Desktop.
Rspec to test my dream
describe "#dream" do
let(:user1) { User.create }
let(:user2) { User.create }
before do
# below update is on the hand of God
user1.update(:luck => true)
user2.update(:luck => false)
end
it "user1 should go UK" do
expect(user1.dream).to be_true
end
it "user2 shouldn't go UK" do
expect(user2.dream).to be_false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment