From 991b50ab35bcb590be6b0119e637015b641d97f6 Mon Sep 17 00:00:00 2001 From: Ryunosuke Sato Date: Thu, 26 Oct 2017 08:28:42 +0900 Subject: [PATCH] Fix to add missing dependency to run generator spec individually (#962) Without this `require` statement, the following error has thrown: $ bundle exec rspec spec/react_on_rails/generators/generator_messages_spec.rb An error occurred while loading ./spec/react_on_rails/generators/generator_messages_spec.rb. Failure/Error: describe GeneratorMessages do it "has an empty messages array" do expect(GeneratorMessages.messages).to be_empty end it "has a method that can add errors" do GeneratorMessages.add_error "Test error" expect(GeneratorMessages.messages) .to match_array([GeneratorMessages.format_error("Test error")]) end NameError: uninitialized constant GeneratorMessages # ./spec/react_on_rails/generators/generator_messages_spec.rb:5:in `' No examples found. Finished in 0.00026 seconds (files took 0.12917 seconds to load) 0 examples, 0 failures, 1 error occurred outside of examples --- CHANGELOG.md | 1 + spec/react_on_rails/generators/generator_messages_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 804c36a39..2d3a8cf2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ Changes since last non-beta release. #### Fixed - Fixed `react_component_hash` functionality in cases of prerendering errors: [PR 960](https://github.com/shakacode/react_on_rails/pull/960) by [Judahmeek](https://github.com/Judahmeek) +- Fix to add missing dependency to run generator spec individually: [PR 962](https://github.com/shakacode/react_on_rails/pull/962) by [tricknotes](https://github.com/tricknotes) *Please add entries here for your pull requests.* diff --git a/spec/react_on_rails/generators/generator_messages_spec.rb b/spec/react_on_rails/generators/generator_messages_spec.rb index 0c1599166..66b69157d 100644 --- a/spec/react_on_rails/generators/generator_messages_spec.rb +++ b/spec/react_on_rails/generators/generator_messages_spec.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "../simplecov_helper" +require_relative "../support/generator_spec_helper" describe GeneratorMessages do it "has an empty messages array" do