Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added example of #its(:attribute) calling the attribute twice

  • Loading branch information...
commit 56b6a65ca17803d255d0e9eee4f1de6cbc84c5d4 1 parent 837ccdd
@briandunn briandunn authored dchelimsky committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 spec/rspec/core/example_group_spec.rb
View
11 spec/rspec/core/example_group_spec.rb
@@ -636,6 +636,17 @@ module RSpec::Core
end
describe "#its" do
+ subject do
+ Class.new do
+ def initialize
+ @call_count = 0
+ end
+ def attribute_call_count
+ @call_count += 1
+ end
+ end.new
+ end
+ its(:attribute_call_count) { should_not == 2 }
context "with nil value" do
subject do
Class.new do
Please sign in to comment.
Something went wrong with that request. Please try again.