-
Notifications
You must be signed in to change notification settings - Fork 242
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
91 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ruby: | ||
enabled: true | ||
config_file: .rubocop.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
inherit_from: | ||
.rubocop_todo.yml | ||
|
||
Style/StringLiterals: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
source "https://rubygems.org" | ||
|
||
gemspec path: '../' | ||
filename = "gemfiles/common" | ||
instance_eval(IO.read(filename), filename, 1) | ||
|
||
gem 'rspec', '~> 2.99' | ||
|
||
group :test do | ||
gem 'coveralls', require: false | ||
gem "guard-compat", ">= 0.0.2", require: false | ||
end | ||
|
||
group :tool do | ||
gem 'ruby_gntp', require: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,4 @@ | ||
source "https://rubygems.org" | ||
|
||
gemspec path: '../' | ||
filename = "gemfiles/common" | ||
instance_eval(IO.read(filename), filename, 1) | ||
|
||
gem 'rspec', '~> 3.4.0' | ||
|
||
group :test do | ||
gem 'coveralls', require: false | ||
gem "guard-compat", ">= 0.0.2", require: false | ||
end | ||
|
||
group :tool do | ||
gem 'ruby_gntp', require: false | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
source "https://rubygems.org" | ||
gemspec path: '../' | ||
|
||
gem "bundler", "~> 1.12", "< 2.0" | ||
gem "rake", "~> 11.1" | ||
gem 'coveralls', require: false | ||
gem "launchy", "~> 2.4" | ||
gem "gem_isolator", '~> 0.1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
RSpec.describe "succeeding spec" do | ||
it "works" do | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
require 'pathname' | ||
|
||
require 'gem_isolator' | ||
|
||
RSpec.describe "Formatter test", type: :acceptance do | ||
context "when isolated" do | ||
before do | ||
allow(Kernel).to receive(:system).and_call_original | ||
end | ||
|
||
context "when guard is not in Gemfile" do | ||
let(:fixture_path) { Pathname('spec/acceptance/fixtures').expand_path } | ||
it "works" do | ||
Bundler.with_clean_env do | ||
formatter_path = Pathname('lib/guard/rspec_formatter.rb').expand_path | ||
succeeding_spec = fixture_path + 'succeeding_spec.rb' | ||
klass_name = 'Guard::RSpecFormatter' | ||
cmd = "rspec -r #{formatter_path} -f #{klass_name} #{succeeding_spec}" | ||
|
||
Dir.mktmpdir do |path| | ||
guard_env = { | ||
'GUARD_RSPEC_RESULTS_FILE' => File.join(path, "results.txt") | ||
} | ||
|
||
GemIsolator.isolate(gems: [%w(rspec ~>3.4)]) do |env, isolation| | ||
env = env.merge(guard_env) | ||
system("pwd") | ||
system(env, "ls -l bundle/ruby/2.3.0/gems") | ||
system(env, "gem env") | ||
system(env, "gem contents rspec-core") | ||
system(env, "which rspec") | ||
system(env, "ls -l #{env['PATH'].split(':').first}") | ||
STDERR.puts cmd.inspect | ||
STDERR.puts env.inspect | ||
result = isolation.system(env, cmd) | ||
expect(result).to eq(true) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters