Skip to content
Browse files

Fix rbx

  • Loading branch information...
1 parent 067ecd3 commit d98f623938806be3e95fbcaf4b4129e62c903bd1 @haines haines committed Nov 16, 2012
Showing with 18 additions and 31 deletions.
  1. +0 −1 .travis.yml
  2. +18 −30 spec/integration/integration_spec.rb
View
1 .travis.yml
@@ -6,5 +6,4 @@ rvm:
- ruby-head
matrix:
allow_failures:
- - rvm: rbx-19mode
- rvm: ruby-head
View
48 spec/integration/integration_spec.rb
@@ -2,44 +2,32 @@
require 'support/dummy_app'
require 'support/matchers/have_text'
-shared_examples_for "a decorator in a view" do
- it "works" do
- # it runs in the correct environment
- page.should have_text(environment).in("#environment")
+app = DummyApp.new(ENV["RAILS_ENV"])
- # it can use path helpers with a model
- page.should have_text("/en/posts/1").in("#path_with_model")
+app.start_server do
+ {view: "/posts/1", mailer: "/posts/1/mail"}.each do |type, path|
+ page = app.get(path)
- # it can use path helpers with an id
- page.should have_text("/en/posts/1").in("#path_with_id")
-
- # it can use url helpers with a model
- page.should have_text("http://www.example.com/en/posts/1").in("#url_with_model")
-
- # it can use url helpers with an id
- page.should have_text("http://www.example.com/en/posts/1").in("#url_with_id")
- end
-end
-
-describe "integration" do
- app = DummyApp.new(ENV["RAILS_ENV"])
-
- app.start_server do
- describe "in #{app.environment}" do
- let(:environment) { app.environment }
+ describe "in a #{type}" do
+ it "runs in the correct environment" do
+ page.should have_text(app.environment).in("#environment")
+ end
- context "in a view" do
- let(:page) { app.get("/posts/1") }
+ it "can use path helpers with a model" do
+ page.should have_text("/en/posts/1").in("#path_with_model")
+ end
- it_behaves_like "a decorator in a view"
+ it "can use path helpers with an id" do
+ page.should have_text("/en/posts/1").in("#path_with_id")
end
- context "in a mailer" do
- let(:page) { app.get("/posts/1/mail") }
+ it "can use url helpers with a model" do
+ page.should have_text("http://www.example.com/en/posts/1").in("#url_with_model")
+ end
- it_behaves_like "a decorator in a view"
+ it "can use url helpers with an id" do
+ page.should have_text("http://www.example.com/en/posts/1").in("#url_with_id")
end
end
end
-
end

0 comments on commit d98f623

Please sign in to comment.
Something went wrong with that request. Please try again.