Class: RSpec::Forward::ForwardToInstanceBuild
- Inherits:
-
Object
- Object
- RSpec::Forward::ForwardToInstanceBuild
show all
- Includes:
- Mocks::ExampleMethods, ForwardMethods
- Defined in:
- lib/rspec/forward/forward_to_instance_build.rb
Instance Method Summary
collapse
#assign_actual, #exp_args, #failure_message, #failure_message_when_negated, included, #instance, #matches_for?, #with, #with_1_arg, #with_1_arg_and_named, #with_named, #with_no_args
Constructor Details
7
8
9
10
11
|
# File 'lib/rspec/forward/forward_to_instance_build.rb', line 7
def initialize(expected)
@expected = expected
@kwargs ||= {}
@args ||= []
end
|
Instance Method Details
#description ⇒ Object
19
20
21
22
23
24
|
# File 'lib/rspec/forward/forward_to_instance_build.rb', line 19
def description
" to pass the arguments to the constructor of instance, execute\n provided instance method and return the instance of the class\n TXT\nend\n".gsub(/\n+/, " ")
|
#matches?(actual) ⇒ Boolean
13
14
15
16
17
|
# File 'lib/rspec/forward/forward_to_instance_build.rb', line 13
def matches?(actual)
assign_actual(actual)
matches_for?(actual, instance)
end
|