Move all fixtures into fixtures/
This commit is contained in:
parent
e0bebb831d
commit
cbf19cc7a4
2
Rakefile
2
Rakefile
|
@ -50,7 +50,7 @@ task :test do
|
|||
check_dependencies unless ENV['SKIP_DEP_CHECK']
|
||||
all_specs = Dir['spec/**/*_spec.rb']
|
||||
all_specs.shuffle! if all_specs.respond_to? :shuffle!
|
||||
system "bacon -Ispec -rubygems -a -q #{all_specs.join ' '}"
|
||||
system "bacon -Ispec -rubygems -q #{all_specs.join ' '}"
|
||||
end
|
||||
task :spec => :test
|
||||
|
||||
|
|
|
@ -6,9 +6,8 @@ end
|
|||
require 'mocha/api'
|
||||
|
||||
require 'pry/test/helper'
|
||||
|
||||
require File.expand_path('../helpers/bacon', __FILE__)
|
||||
require File.expand_path('../helpers/mock_pry', __FILE__)
|
||||
require 'helpers/bacon'
|
||||
require 'helpers/mock_pry'
|
||||
|
||||
class Module
|
||||
public :remove_const
|
||||
|
|
|
@ -276,7 +276,7 @@ OUTPUT
|
|||
end
|
||||
|
||||
describe "nesting" do
|
||||
test = File.read("spec/example_nesting.rb")
|
||||
test = File.read("spec/fixtures/example_nesting.rb")
|
||||
|
||||
test.lines.each_with_index do |line, i|
|
||||
result = line.split("#").last.strip
|
||||
|
|
|
@ -307,8 +307,8 @@ describe Pry do
|
|||
|
||||
describe "test loading rc files" do
|
||||
before do
|
||||
Pry::HOME_RC_FILE.replace File.expand_path("../testrc", __FILE__)
|
||||
Pry::LOCAL_RC_FILE.replace File.expand_path("../testrc", __FILE__) + "/../testrc"
|
||||
Pry::HOME_RC_FILE.replace "spec/fixtures/testrc"
|
||||
Pry::LOCAL_RC_FILE.replace "spec/fixtures/testrc/../testrc"
|
||||
Pry.instance_variable_set(:@initial_session, true)
|
||||
end
|
||||
|
||||
|
@ -355,7 +355,7 @@ describe Pry do
|
|||
|
||||
describe "that raise exceptions" do
|
||||
before do
|
||||
Pry::HOME_RC_FILE = File.expand_path("../testrcbad", __FILE__)
|
||||
Pry::HOME_RC_FILE = "spec/fixtures/testrcbad"
|
||||
Pry.config.should_load_rc = true
|
||||
Pry.config.should_load_local_rc = false
|
||||
|
||||
|
@ -390,7 +390,8 @@ describe Pry do
|
|||
end
|
||||
|
||||
it "should output an error" do
|
||||
@doing_it[].should =~ /Error loading #{File.expand_path("../testrcbad", __FILE__)}: messin with ya/
|
||||
@doing_it.call.should ==
|
||||
"Error loading spec/fixtures/testrcbad: messin with ya"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -11,10 +11,8 @@ describe Pry::WrappedModule do
|
|||
describe "candidates" do
|
||||
before do
|
||||
class Host
|
||||
source_files = [File.join(File.dirname(__FILE__), "candidate_helper1.rb"),
|
||||
File.join(File.dirname(__FILE__), "candidate_helper2.rb")]
|
||||
|
||||
source_files.each do |file|
|
||||
%w(spec/fixtures/candidate_helper1.rb
|
||||
spec/fixtures/candidate_helper2.rb).each do |file|
|
||||
binding.eval File.read(file), file, 1
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue