module RSpec::The

Public Instance Methods

is_expected() click to toggle source
# File lib/rspec/the.rb, line 6
def is_expected
  expect(__the_subject)
end
the(method, &block) click to toggle source
# File lib/rspec/the.rb, line 2
def the(method, &block)
  describe(method.to_s) do
    let(:__the_subject) { self.public_send method }

    def is_expected
      expect(__the_subject)
    end
    alias_method :are_expected, :is_expected

    example(nil, &block)
  end
end