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:
parent
398d971a2b
commit
f10e08acab
1 changed files with 1 additions and 7 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Reference in a new issue