1
0
Fork 0
mirror of https://github.com/pry/pry-rails.git synced 2022-11-09 12:36:03 -05:00

Avoid warnings by not initializing the console more than once

This commit is contained in:
Ryan Fitzgerald 2012-09-23 15:40:51 -07:00
parent 398d971a2b
commit f10e08acab

View file

@ -4,16 +4,10 @@ require 'spec_helper'
require 'rails/commands/console' require 'rails/commands/console'
describe PryRails::Railtie do describe PryRails::Railtie do
it 'should start Pry instead of IRB' do it 'should start Pry instead of IRB and make the helpers available' do
mock(Pry).start mock(Pry).start
Rails::Console.start(Rails.application) Rails::Console.start(Rails.application)
assert RR.verify assert RR.verify
end
it 'should make the helpers available' do
stub(Pry).start
Rails::Console.start(Rails.application)
RR.verify
%w(app helper reload!).each do |helper| %w(app helper reload!).each do |helper|
TOPLEVEL_BINDING.eval("respond_to?(:#{helper}, true)").must_equal true TOPLEVEL_BINDING.eval("respond_to?(:#{helper}, true)").must_equal true