Permalink
Browse files

refresh rspec config + update files

  • Loading branch information...
e2 committed Nov 3, 2014
1 parent 440ee59 commit c044f7327da34238a9476ba902bfbc6404b3d5ca
Showing with 141 additions and 131 deletions.
  1. +1 −0 .rspec
  2. +1 −1 Gemfile
  3. +1 −2 spec/guard_spec.rb
  4. +1 −2 spec/lib/guard/cli_spec.rb
  5. +1 −2 spec/lib/guard/commander_spec.rb
  6. +1 −2 spec/lib/guard/commands/all_spec.rb
  7. +1 −3 spec/lib/guard/commands/change_spec.rb
  8. +1 −3 spec/lib/guard/commands/notification_spec.rb
  9. +1 −3 spec/lib/guard/commands/pause_spec.rb
  10. +1 −2 spec/lib/guard/commands/reload_spec.rb
  11. +1 −2 spec/lib/guard/commands/scope_spec.rb
  12. +1 −3 spec/lib/guard/commands/show_spec.rb
  13. +1 −3 spec/lib/guard/deprecated_methods_spec.rb
  14. +1 −2 spec/lib/guard/dsl_describer_spec.rb
  15. +1 −2 spec/lib/guard/dsl_spec.rb
  16. +1 −3 spec/lib/guard/group_spec.rb
  17. +1 −2 spec/lib/guard/guard_spec.rb
  18. +1 −3 spec/lib/guard/guardfile/evaluator_spec.rb
  19. +1 −3 spec/lib/guard/guardfile/generator_spec.rb
  20. +1 −5 spec/lib/guard/guardfile_spec.rb
  21. +1 −2 spec/lib/guard/interactor_spec.rb
  22. +1 −3 spec/lib/guard/jobs/pry_wrapper_spec.rb
  23. +1 −3 spec/lib/guard/jobs/sleep_spec.rb
  24. +1 −3 spec/lib/guard/notifier_spec.rb
  25. +1 −3 spec/lib/guard/notifiers/base_spec.rb
  26. +1 −5 spec/lib/guard/notifiers/emacs_spec.rb
  27. +1 −3 spec/lib/guard/notifiers/file_notifier_spec.rb
  28. +1 −3 spec/lib/guard/notifiers/gntp_spec.rb
  29. +1 −3 spec/lib/guard/notifiers/growl_spec.rb
  30. +1 −3 spec/lib/guard/notifiers/libnotify_spec.rb
  31. +1 −3 spec/lib/guard/notifiers/notifysend_spec.rb
  32. +1 −3 spec/lib/guard/notifiers/rb_notifu_spec.rb
  33. +1 −3 spec/lib/guard/notifiers/terminal_notifier_spec.rb
  34. +1 −3 spec/lib/guard/notifiers/terminal_title_spec.rb
  35. +1 −5 spec/lib/guard/notifiers/tmux_spec.rb
  36. +1 −3 spec/lib/guard/options_spec.rb
  37. +1 −2 spec/lib/guard/plugin/base_spec.rb
  38. +1 −2 spec/lib/guard/plugin/hooker_spec.rb
  39. +1 −2 spec/lib/guard/plugin_spec.rb
  40. +1 −3 spec/lib/guard/plugin_util_spec.rb
  41. +1 −2 spec/lib/guard/reevaluator_spec.rb
  42. +1 −2 spec/lib/guard/runner_spec.rb
  43. +1 −2 spec/lib/guard/setuper_spec.rb
  44. +1 −5 spec/lib/guard/sheller_spec.rb
  45. +1 −1 spec/lib/guard/terminal_spec.rb
  46. +1 −5 spec/lib/guard/ui_spec.rb
  47. +1 −2 spec/lib/guard/watcher_spec.rb
  48. +94 −4 spec/spec_helper.rb
View
1 .rspec
@@ -1,3 +1,4 @@
--fail-fast
--format documentation
--color
--require spec_helper
View
@@ -7,7 +7,7 @@ gem "rake"
group :development, :test do
# This plugin is required in the tests!
gem "guard-rspec", require: false
gem "rspec", ">= 3.0.0"
gem "rspec", ">= 3.0.0", require: false
gem "guard-rubocop", require: false
gem "guard-cucumber", require: false
gem "aruba", require: false
View
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard do
RSpec.describe Guard do
let(:interactor) { instance_double(Guard::Interactor) }
let(:evaluator) { instance_double(Guard::Guardfile::Evaluator) }
@@ -1,4 +1,3 @@
require "spec_helper"
require "guard/cli"
RSpec.shared_examples "avoids Bundler warning" do |meth|
@@ -64,7 +63,7 @@
end
end
describe Guard::CLI do
RSpec.describe Guard::CLI do
let(:guard) { Guard }
let(:ui) { Guard::UI }
let(:dsl_describer) { instance_double(::Guard::DslDescriber) }
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard::Commander do
RSpec.describe Guard::Commander do
let(:interactor) { instance_double(Guard::Interactor) }
before do
@@ -1,9 +1,8 @@
require "spec_helper"
require "guard/plugin"
require "guard/commands/all"
describe Guard::Commands::All do
RSpec.describe Guard::Commands::All do
before { described_class.import }
let(:foo_group) { instance_double(Guard::Group) }
@@ -1,8 +1,6 @@
require "spec_helper"
require "guard/commands/change"
describe Guard::Commands::Change do
RSpec.describe Guard::Commands::Change do
before { described_class.import }
context "with a file" do
it "runs the :run_on_changes action with the given file" do
@@ -1,8 +1,6 @@
require "spec_helper"
require "guard/commands/notification"
describe Guard::Commands::Notification do
RSpec.describe Guard::Commands::Notification do
before { described_class.import }
it "toggles the Guard notifier" do
expect(::Guard::Notifier).to receive(:toggle)
@@ -1,8 +1,6 @@
require "spec_helper"
require "guard/commands/pause"
describe Guard::Commands::Pause do
RSpec.describe Guard::Commands::Pause do
before { described_class.import }
it "tells Guard to pause" do
expect(::Guard).to receive(:async_queue_add).with([:guard_pause])
@@ -1,9 +1,8 @@
require "spec_helper"
require "guard/plugin"
require "guard/commands/reload"
describe Guard::Commands::Reload do
RSpec.describe Guard::Commands::Reload do
before { described_class.import }
let(:foo_group) { instance_double(Guard::Group) }
@@ -1,9 +1,8 @@
require "spec_helper"
require "guard/plugin"
require "guard/commands/scope"
describe Guard::Commands::Scope do
RSpec.describe Guard::Commands::Scope do
before { described_class.import }
let(:foo_group) { instance_double(Guard::Group) }
@@ -1,8 +1,6 @@
require "spec_helper"
require "guard/commands/show"
describe Guard::Commands::Show do
RSpec.describe Guard::Commands::Show do
before { described_class.import }
it "tells Guard to output DSL description" do
expect(::Guard).to receive(:async_queue_add).with([:guard_show])
@@ -1,8 +1,6 @@
require "spec_helper"
include Guard
describe Guard::DeprecatedMethods do
RSpec.describe Guard::DeprecatedMethods do
before(:all) do
module TestModule
extend DeprecatedMethods
@@ -1,10 +1,9 @@
# encoding: utf-8
require "spec_helper"
require "guard/plugin"
require "guard/dsl_describer"
require "formatador"
describe Guard::DslDescriber do
RSpec.describe Guard::DslDescriber do
let(:interactor) { instance_double(Guard::Interactor) }
let(:guardfile) do
@@ -1,9 +1,8 @@
require "spec_helper"
require "guard/plugin"
require "guard/dsl"
describe Guard::Dsl do
RSpec.describe Guard::Dsl do
let(:guardfile_evaluator) { instance_double(Guard::Guardfile::Evaluator) }
let(:interactor) { instance_double(Guard::Interactor) }
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Group do
RSpec.describe Guard::Group do
subject { described_class.new(name, options) }
let(:name) { :foo }
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/guard"
describe Guard::Guard do
RSpec.describe Guard::Guard do
describe "#initialize" do
it "assigns the defined watchers" do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Guardfile::Evaluator do
RSpec.describe Guard::Guardfile::Evaluator do
let!(:local_guardfile) { (Pathname.pwd + "Guardfile").to_s }
let!(:home_guardfile) { (Pathname("~").expand_path + ".Guardfile").to_s }
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Guardfile::Generator do
RSpec.describe Guard::Guardfile::Generator do
let(:plugin_util) { instance_double(Guard::PluginUtil) }
let(:guardfile_generator) { described_class.new }
@@ -1,8 +1,4 @@
require "spec_helper"
include Guard
describe Guardfile do
RSpec.describe Guard::Guardfile do
let(:guardfile_generator) { instance_double(Guard::Guardfile::Generator) }
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard::Interactor do
RSpec.describe Guard::Interactor do
let(:pry_interactor) { double(Guard::Jobs::PryWrapper) }
let(:sleep_interactor) { double(Guard::Jobs::Sleep) }
@@ -1,8 +1,6 @@
require "spec_helper"
require "guard/jobs/pry_wrapper"
describe Guard::Jobs::PryWrapper do
RSpec.describe Guard::Jobs::PryWrapper do
subject { described_class.new({}) }
let(:listener) { instance_double(Listen::Listener) }
let(:pry_config) { double("pry_config") }
@@ -1,8 +1,6 @@
require "spec_helper"
require "guard/jobs/sleep"
describe Guard::Jobs::Sleep do
RSpec.describe Guard::Jobs::Sleep do
subject { described_class.new({}) }
describe "#foreground" do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier do
RSpec.describe Guard::Notifier do
let(:gntp) { { name: :gntp, options: { color: true } } }
let(:growl) { { name: :growl, options: {} } }
let(:gntp_object) { double("GNTP").as_null_object }
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::Base do
RSpec.describe Guard::Notifier::Base do
let(:gntp) do
double("GNTP notifier", name: "gntp", title: "GNTP", options: {})
end
@@ -1,8 +1,4 @@
require "spec_helper"
include Guard
describe Guard::Notifier::Emacs do
RSpec.describe Guard::Notifier::Emacs do
let(:notifier) { described_class.new }
describe ".available?" do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::FileNotifier do
RSpec.describe Guard::Notifier::FileNotifier do
let(:notifier) { described_class.new }
describe ".available?" do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::GNTP do
RSpec.describe Guard::Notifier::GNTP do
let(:notifier) { described_class.new }
let(:gntp) { double("GNTP").as_null_object }
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::Growl do
RSpec.describe Guard::Notifier::Growl do
let(:notifier) { described_class.new }
let(:growl) { double("Growl", installed?: true) }
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::Libnotify do
RSpec.describe Guard::Notifier::Libnotify do
let(:notifier) { described_class.new }
before do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::NotifySend do
RSpec.describe Guard::Notifier::NotifySend do
let(:notifier) { described_class.new }
before do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::Notifu do
RSpec.describe Guard::Notifier::Notifu do
let(:notifier) { described_class.new }
before do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::TerminalNotifier do
RSpec.describe Guard::Notifier::TerminalNotifier do
let(:notifier) { described_class.new }
before do
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Notifier::TerminalTitle do
RSpec.describe Guard::Notifier::TerminalTitle do
let(:notifier) { described_class.new }
describe ".available?" do
@@ -1,8 +1,4 @@
require "spec_helper"
include Guard
describe Guard::Notifier::Tmux do
RSpec.describe Guard::Notifier::Tmux do
let(:notifier) { described_class.new }
let(:tmux_version) { 1.7 }
@@ -1,6 +1,4 @@
require "spec_helper"
describe Guard::Options do
RSpec.describe Guard::Options do
describe ".initialize" do
it "handles nil options" do
expect { described_class.new(nil) }.to_not raise_error
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard::Plugin::Base do
RSpec.describe Guard::Plugin::Base do
before do
stub_const "Guard::DuMmy", Class.new(Guard::Plugin)
end
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard::Plugin::Hooker do
RSpec.describe Guard::Plugin::Hooker do
let(:fake_plugin) do
Class.new(Guard::Plugin) do
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard::Plugin do
RSpec.describe Guard::Plugin do
describe "#initialize" do
it "assigns the defined watchers" do
@@ -1,9 +1,7 @@
require "spec_helper"
require "guard/plugin"
require "guard/guard"
describe Guard::PluginUtil do
RSpec.describe Guard::PluginUtil do
let!(:rubygems_version_1_7_2) { Gem::Version.create("1.7.2") }
let!(:rubygems_version_1_8_0) { Gem::Version.create("1.8.0") }
@@ -1,10 +1,9 @@
require "spec_helper"
require "guard/plugin"
require "guard/reevaluator.rb"
require "guard/ui"
describe Guard::Reevaluator do
RSpec.describe Guard::Reevaluator do
let(:options) { {} }
let(:evaluator) { instance_double(Guard::Guardfile::Evaluator) }
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard::Runner do
RSpec.describe Guard::Runner do
let(:interactor) { instance_double(Guard::Interactor) }
let(:backend_group) do
@@ -1,7 +1,6 @@
require "spec_helper"
require "guard/plugin"
describe Guard::Setuper do
RSpec.describe Guard::Setuper do
let(:evaluator) { instance_double(Guard::Guardfile::Evaluator) }
let(:pry_interactor) { double(Guard::Jobs::PryWrapper) }
Oops, something went wrong.

0 comments on commit c044f73

Please sign in to comment.