0
-require File.dirname(__FILE__) + '/../spec_helper'
0
-describe "script/spec_server file", :shared => true do
0
- attr_accessor :tmbundle_install_directory
0
- attr_reader :animals_yml_path, :original_animals_content
0
- @animals_yml_path = File.expand_path("#{RAILS_ROOT}/spec/fixtures/animals.yml")
0
- @original_animals_content = File.read(animals_yml_path)
0
- File.open(animals_yml_path, "w") do |f|
0
- f.write original_animals_content
0
- system "lsof -i tcp:8989 | sed /COMMAND/d | awk '{print $2}' | xargs kill"
0
- dir = File.dirname(__FILE__)
0
- Timeout.timeout(10) do
0
- output = `#{RAILS_ROOT}/script/spec #{dir}/sample_spec.rb --drb 2>&1`
0
- break unless output.include?("No server is running")
0
- if $?.exitstatus != 0 || output !~ /0 failures/
0
- flunk "command 'script/spec spec/sample_spec' failed\n#{output}"
0
- fixtures = YAML.load(@original_animals_content)
0
- fixtures['pig']['name'] = "Piggy"
0
- File.open(animals_yml_path, "w") do |f|
0
- f.write YAML.dump(fixtures)
0
- Timeout.timeout(10) do
0
- output = `#{RAILS_ROOT}/script/spec #{dir}/sample_modified_fixture.rb --drb 2>&1`
0
- break unless output.include?("No server is running")
0
- if $?.exitstatus != 0 || output !~ /0 failures/
0
- flunk "command 'script/spec spec/sample_modified_fixture' failed\n#{output}"
0
- dir = File.dirname(__FILE__)
0
- system "cd #{RAILS_ROOT}; script/spec_server"
0
-describe "script/spec_server file without TextMate bundle" do
0
- it_should_behave_like "script/spec_server file"
0
-describe "script/spec_server file with TextMate bundle" do
0
- it_should_behave_like "script/spec_server file"
0
- dir = File.dirname(__FILE__)
0
- @tmbundle_install_directory = File.expand_path("#{Dir.tmpdir}/Library/Application Support/TextMate/Bundles")
0
- @bundle_name = "RSpec.tmbundle"
0
- FileUtils.mkdir_p(tmbundle_install_directory)
0
- bundle_dir = File.expand_path("#{dir}/../../../../../../#{@bundle_name}")
0
- File.directory?(bundle_dir).should be_true
0
- unless system(%Q|ln -s #{bundle_dir} "#{tmbundle_install_directory}"|)
0
- raise "Creating link to Textmate Bundle"
0
- bundle_file_to_remove = "#{tmbundle_install_directory}/#{@bundle_name}"
0
- if bundle_file_to_remove == "/"
0
- raise "bundle file path resolved to '/' - could not call rm"
0
- unless system(%Q|rm "#{bundle_file_to_remove}"|)
0
- raise "Removing Textmate bundle link failed"
0
+# require File.dirname(__FILE__) + '/../spec_helper'
0
+# describe "script/spec_server file", :shared => true do
0
+# attr_accessor :tmbundle_install_directory
0
+# attr_reader :animals_yml_path, :original_animals_content
0
+# @animals_yml_path = File.expand_path("#{RAILS_ROOT}/spec/fixtures/animals.yml")
0
+# @original_animals_content = File.read(animals_yml_path)
0
+# File.open(animals_yml_path, "w") do |f|
0
+# f.write original_animals_content
0
+# system "lsof -i tcp:8989 | sed /COMMAND/d | awk '{print $2}' | xargs kill"
0
+# dir = File.dirname(__FILE__)
0
+# Timeout.timeout(10) do
0
+# output = `#{RAILS_ROOT}/script/spec #{dir}/sample_spec.rb --drb 2>&1`
0
+# break unless output.include?("No server is running")
0
+# if $?.exitstatus != 0 || output !~ /0 failures/
0
+# flunk "command 'script/spec spec/sample_spec' failed\n#{output}"
0
+# fixtures = YAML.load(@original_animals_content)
0
+# fixtures['pig']['name'] = "Piggy"
0
+# File.open(animals_yml_path, "w") do |f|
0
+# f.write YAML.dump(fixtures)
0
+# Timeout.timeout(10) do
0
+# output = `#{RAILS_ROOT}/script/spec #{dir}/sample_modified_fixture.rb --drb 2>&1`
0
+# break unless output.include?("No server is running")
0
+# if $?.exitstatus != 0 || output !~ /0 failures/
0
+# flunk "command 'script/spec spec/sample_modified_fixture' failed\n#{output}"
0
+# def start_spec_server
0
+# dir = File.dirname(__FILE__)
0
+# system "cd #{RAILS_ROOT}; script/spec_server"
0
+# describe "script/spec_server file without TextMate bundle" do
0
+# it_should_behave_like "script/spec_server file"
0
+# describe "script/spec_server file with TextMate bundle" do
0
+# it_should_behave_like "script/spec_server file"
0
+# dir = File.dirname(__FILE__)
0
+# @tmbundle_install_directory = File.expand_path("#{Dir.tmpdir}/Library/Application Support/TextMate/Bundles")
0
+# @bundle_name = "RSpec.tmbundle"
0
+# FileUtils.mkdir_p(tmbundle_install_directory)
0
+# bundle_dir = File.expand_path("#{dir}/../../../../../../#{@bundle_name}")
0
+# File.directory?(bundle_dir).should be_true
0
+# unless system(%Q|ln -s #{bundle_dir} "#{tmbundle_install_directory}"|)
0
+# raise "Creating link to Textmate Bundle"
0
+# bundle_file_to_remove = "#{tmbundle_install_directory}/#{@bundle_name}"
0
+# if bundle_file_to_remove == "/"
0
+# raise "bundle file path resolved to '/' - could not call rm"
0
+# unless system(%Q|rm "#{bundle_file_to_remove}"|)
0
+# raise "Removing Textmate bundle link failed"