-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CLI now uses Launchy to open the graph, for cross platform
compatibility. Removed Gemfile.lock from repo, and moved gem dependencies to the gemspec.
- Loading branch information
Showing
6 changed files
with
37 additions
and
35 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.DS_Store | ||
.bundle | ||
pkg | ||
Gemfile.lock |
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 |
---|---|---|
|
@@ -2,8 +2,6 @@ source 'https://rubygems.org' | |
|
||
gemspec | ||
|
||
gem 'mixlib-cli' | ||
|
||
group :test do | ||
gem 'rspec' | ||
end |
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
require 'test_helper' | ||
require_relative '../lib/sandi_meter/cli' | ||
|
||
describe SandiMeter::CLI do | ||
let(:cli) { SandiMeter::CLI } | ||
|
||
describe '#execute' do | ||
before do | ||
@original_argv = ARGV | ||
ARGV.clear | ||
end | ||
|
||
after do | ||
ARGV.clear | ||
ARGV.concat(@original_argv) | ||
end | ||
|
||
context 'with the graph flag passed in' do | ||
before { ARGV.push('-g') } | ||
after { ARGV.pop } | ||
|
||
it 'opens the graph in a web browser' do | ||
cli.should_receive(:open_in_browser) | ||
expect { cli.execute }.to raise_error(SystemExit) | ||
end | ||
end | ||
end | ||
end |