Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Fix coveralls and a brittle test #935

Merged
merged 4 commits into from
Jun 8, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions features/support/env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@
end
end if RUBY_PLATFORM == 'java'

require 'coveralls'
Coveralls.wear! do
add_filter '/bundle/'
end
2 changes: 1 addition & 1 deletion script/test_all
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "--------------------------------------------------------------------"
echo

for file in `find spec -iname '*_spec.rb'`; do
bin/rspec $file -b --format progress
NO_COVERALLS=1 bin/rspec $file -b --format progress
done

# Prepare RUBYOPT for scenarios that are shelling out to ruby,
Expand Down
18 changes: 10 additions & 8 deletions spec/rspec/core/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1098,22 +1098,24 @@ def metadata_hash(*args)
debugger.should_receive(:start)
config.debug = true
end

it 'sets the reader to true' do
config.debug = true
expect(config.debug?).to eq true
end
end

describe "#debug=false" do
it "does not require 'ruby-debug'" do
config.should_not_receive(:require).with('ruby-debug')
config.debug = false
end
end

it 'sets the reader to false' do
config.debug = false
expect(config.debug?).to eq false
describe "#debug?" do
it 'returns true if the debugger has been loaded' do
stub_const("Debugger", Object.new)
expect(config.debug?).to be_true
end

it 'returns false if the debugger has not been loaded' do
hide_const("Debugger")
expect(config.debug?).to be_false
end
end

Expand Down
12 changes: 8 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
require 'rubygems'

require 'simplecov' if RUBY_VERSION.to_f > 1.8
require 'coveralls'
Coveralls.wear! do
add_filter '/bundle/'
unless ENV['NO_COVERALLS']
require 'simplecov' if RUBY_VERSION.to_f > 1.8
require 'coveralls'
Coveralls.wear! do
add_filter '/bundle/'
add_filter '/spec/'
add_filter '/tmp/'
end
end

begin
Expand Down