Permalink
Browse files

Move all fixtures into fixtures/

  • Loading branch information...
1 parent e0bebb8 commit cbf19cc7a47d7a5a2d723eefc48ef1b2130d3220 @rf- rf- committed Dec 9, 2012
View
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -6,9 +6,8 @@
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
View
@@ -276,7 +276,7 @@ def a
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
View
@@ -307,8 +307,8 @@ class Hello
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 @@ class Hello
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 @@ class Hello
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 "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

0 comments on commit cbf19cc

Please sign in to comment.