Skip to content

Instantly share code, notes, and snippets.

@steveklabnik
Created September 6, 2012 00:36
Show Gist options
  • Select an option

  • Save steveklabnik/3648829 to your computer and use it in GitHub Desktop.

Select an option

Save steveklabnik/3648829 to your computer and use it in GitHub Desktop.
$ rspec
F
Failures:
1) Person compares birthdays
Failure/Error: joe.birthday.should == jon.birthday
expected: "7/6/1986"
got: "5/6/1986" (using ==)
# ./spec/person_spec.rb:9:in `block (2 levels) in'
Finished in 0.00053 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/person_spec.rb:5 # Person compares birthdays
class Person
attr_accessor :name, :birthday
Birthday = Struct.new(:day, :month, :year)
def initialize(opts = {})
@name = opts[:name]
@birthday = Birthday.new(opts[:day], opts[:month], opts[:year])
end
end
$ rspec
F
Failures:
1) Person compares birthdays
Failure/Error: joe.birthday.should == jon.birthday
expected: #
got: # (using ==)
Diff:
@@ -1,2 +1,2 @@
-#
+#
# ./spec/person_spec.rb:9:in `block (2 levels) in'
Finished in 0.00092 seconds
1 example, 1 failure
Failed examples:
rspec ./spec/person_spec.rb:5 # Person compares birthdays
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment