Skip to content

Instantly share code, notes, and snippets.

@jimsynz
Last active December 21, 2015 13:39
Show Gist options
  • Save jimsynz/6314107 to your computer and use it in GitHub Desktop.
Save jimsynz/6314107 to your computer and use it in GitHub Desktop.
1) UserNotificationHelper should eq "foo"
Failure/Error: it { expect(method(:user)).to eq "foo"}
expected: "foo"
got: #<Method: RSpec::Core::ExampleGroup::Nested_1(UserNotificationHelper)#user>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-"foo"
+#<Method: RSpec::Core::ExampleGroup::Nested_1(UserNotificationHelper)#user>
# ./spec/helpers/user_notification_helper_spec.rb:7:in `block (2 levels) in <top (required)>'
2) UserNotificationHelper should eq "foo"
Failure/Error: it { expect(method(:user).source_location).to eq "foo"}
expected: "foo"
got: ["/Users/jnh/Dev/Construct/app/helpers/user_notification_helper.rb", 2]
(compared using ==)
# ./spec/helpers/user_notification_helper_spec.rb:8:in `block (2 levels) in <top (required)>'
module UserNotificationHelper do
def user
@user
end
end
describe UserNotificationHelper do
it { expect(method(:user)).to eq "foo"}
it { expect(method(:user).source_location).to eq "foo"}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment