Module: RspecRailsMatchers::Sugar::ClassContextMethods

Defined in:
lib/rspec_rails_matchers/sugar.rb

Instance Method Summary collapse

Instance Method Details

#its(attribute, &block) ⇒ Object



8
9
10
11
12
13
# File 'lib/rspec_rails_matchers/sugar.rb', line 8

def its(attribute, &block)
  describe("its #{attribute}") do
    define_method(:subject) { super().send(attribute) }
    it(&block)
  end
end