Fix test_app specs to work with rspec 2.14
This commit is contained in:
parent
577aa41c0e
commit
0bdeda4a05
5 changed files with 12 additions and 13 deletions
|
@ -3,7 +3,7 @@ shared_examples_for 'a method filter parse result' do
|
|||
expected_class.stub(:new => response)
|
||||
end
|
||||
|
||||
let(:response) { mock('Response') }
|
||||
let(:response) { double('Response') }
|
||||
|
||||
it { should be(response) }
|
||||
|
||||
|
|
|
@ -8,10 +8,9 @@ shared_examples_for 'a method match' do
|
|||
let(:method_arity) { values.fetch(:method_arity) }
|
||||
let(:scope) { values.fetch(:scope) }
|
||||
let(:node_class) { values.fetch(:node_class) }
|
||||
|
||||
let(:node) { mutation_subject.node }
|
||||
let(:context) { mutation_subject.context }
|
||||
let(:mutation_subject) { subject.first }
|
||||
let(:node) { mutation_subject.node }
|
||||
let(:context) { mutation_subject.context }
|
||||
let(:mutation_subject) { subject.first }
|
||||
|
||||
it 'should return one subject' do
|
||||
subject.size.should be(1)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
shared_examples_for 'a mutator' do
|
||||
subject { object.each(node) { |item| yields << item } }
|
||||
|
||||
let(:yields) { [] }
|
||||
let(:object) { described_class }
|
||||
let(:yields) { [] }
|
||||
let(:object) { described_class }
|
||||
|
||||
unless instance_methods.map(&:to_s).include?('node')
|
||||
let(:node) { source.to_ast }
|
||||
let(:node) { source.to_ast }
|
||||
end
|
||||
|
||||
it_should_behave_like 'a command method'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# encoding: utf-8
|
||||
|
||||
$LOAD_PATH << File.join(File.dirname(__FILE__), '../lib')
|
||||
|
||||
require 'test_app'
|
||||
require 'rspec'
|
||||
|
||||
$: << File.join(File.dirname(__FILE__), 'lib')
|
||||
|
||||
|
||||
# require spec support files and shared behavior
|
||||
Dir[File.expand_path('../{support,shared}/**/*.rb', __FILE__)].each { |f| require f }
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe TestApp::Literal,'#string' do
|
||||
subject { object.command(mock) }
|
||||
describe TestApp::Literal, '#string' do
|
||||
subject { object.command(double) }
|
||||
|
||||
let(:object) { described_class.new }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue