spec/lib/sinclair/method_definition_spec.rb in sinclair-1.1.0 vs spec/lib/sinclair/method_definition_spec.rb in sinclair-1.1.1
- old
+ new
@@ -1,24 +1,24 @@
require 'spec_helper'
describe Sinclair::MethodDefinition do
- let(:clazz) { Class.new }
- let(:instance) { clazz.new }
+ let(:klass) { Class.new }
+ let(:instance) { klass.new }
describe '#build' do
let(:method_name) { :the_method }
context 'when method was defined with an string' do
let(:code) { '"Self ==> " + self.to_s' }
subject { described_class.new(method_name, code) }
before do
- subject.build(clazz)
+ subject.build(klass)
end
- it 'adds the method to the clazz instance' do
+ it 'adds the method to the klass instance' do
expect(instance).to respond_to(method_name)
end
it 'evaluates return of the method within the instance context' do
expect(instance.the_method).to eq("Self ==> #{instance}")
@@ -31,13 +31,13 @@
"Self ==> " + self.to_s
end
end
before do
- subject.build(clazz)
+ subject.build(klass)
end
- it 'adds the method to the clazz instance' do
+ it 'adds the method to the klass instance' do
expect(instance).to respond_to(method_name)
end
it 'evaluates return of the method within the instance context' do
expect(instance.the_method).to eq("Self ==> #{instance}")