Anonymous avatar Anonymous committed 490d56b

Make the Riak::TestServer generator a bit more forgiving.

Comments (0)

Files changed (1)

ripple/lib/rails/generators/ripple/test/test_generator.rb

       def create_rspec_file
         if File.file?(Rails.root + 'spec/spec_helper.rb')
           template 'test_server.rb', 'spec/support/ripple.rb'
-          inject_into_file 'spec/spec_helper.rb', :after => "RSpec.configure do |config|" do
-            "  config.after(:each) do\n   Ripple::TestServer.clear\n  end\n"
+          inject_into_file 'spec/spec_helper.rb', :after => /R[Ss]pec\.configure do \|config\|/ do
+            "\n  config.after(:each) do\n    Ripple::TestServer.clear\n  end\n"
           end
         end
       end
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.