spec/rails_integration_spec.rb in reflexive-0.0.6 vs spec/rails_integration_spec.rb in reflexive-0.1.0
- old
+ new
@@ -8,10 +8,14 @@
shared_examples_for "fresh Rails app with Reflexive installed" do
it "responds on localhost" do
get("/").should include("Welcome aboard")
end
+ it "doesn't respond on not existing path" do
+ proc { get("/not_exist") }.should raise_error
+ end
+
it "responds for Reflexive paths" do
constant_reflexion = get("/reflexive/constants/ActiveRecord::Base")
constant_reflexion.should include("ActiveRecord")
constant_reflexion.should include("Object")
constant_reflexion.should include("Class")
@@ -110,14 +114,17 @@
"class Application < Rails::Application",
<<-RUBY)
class Application < Rails::Application
config.middleware.insert_after("Rack::Lock", "Reflexive::Application")
RUBY
+
+ patch_app_file("Gemfile", /\z/, "\ngem 'reflexive'")
end
it "properly" do
Dir.chdir($app_dir) do
IO.read("config/application.rb").should include("Reflexive")
+ IO.read("Gemfile").should include("reflexive")
end
end
describe "and runs application" do
before(:all) do