spec/lib/sinclair/method_definition_spec.rb in sinclair-1.11.0 vs spec/lib/sinclair/method_definition_spec.rb in sinclair-1.12.0
- old
+ new
@@ -23,11 +23,21 @@
end
context 'when the builder has been defined' do
let(:definition_class) do
Class.new(described_class) do
- def code_line
- '10'
+ attr_reader :name
+
+ def initialize(name)
+ @name = name
+ end
+
+ def code_definition
+ <<-CODE
+ def #{name}
+ 10
+ end
+ CODE
end
end
end
before do