class RSpec::ExpectIt::ExpectationTargets::ExpectIt
Attributes
context[RW]
subject[RW]
Public Class Methods
new(context, subject = nil)
click to toggle source
# File lib/rspec/expect_it/expectation_targets/expect_it.rb, line 7 def initialize(context, subject = nil) self.context = context self.subject = subject end
Public Instance Methods
to(matcher)
click to toggle source
# File lib/rspec/expect_it/expectation_targets/expect_it.rb, line 12 def to(matcher) context.expect(get_subject).to(matcher) end
to_not(matcher)
click to toggle source
# File lib/rspec/expect_it/expectation_targets/expect_it.rb, line 16 def to_not(matcher) context.expect(get_subject).to_not(matcher) end
Private Instance Methods
get_subject()
click to toggle source
# File lib/rspec/expect_it/expectation_targets/expect_it.rb, line 22 def get_subject subject || context.subject end