Permalink
Browse files

Test against Rails 4 (#81)

Only non-test change necessary was updating the gemspec.
  • Loading branch information...
1 parent 3c4182a commit 1fc9cb8073a6b162280dc596cf9b024002934dab @jfirebaugh committed Nov 8, 2012
View
@@ -1,9 +1,16 @@
+language: ruby
rvm:
- 1.8.7
- 1.9.3
+gemfile:
+ - Gemfile
+ - Gemfile-rails4
before_script:
- sh -e /etc/init.d/xvfb start
- export DISPLAY=:99.0
matrix:
+ exclude:
+ - gemfile: Gemfile-rails4
+ rvm: 1.8.7
allow_failures:
- { rvm: 1.8.7 }
View
@@ -0,0 +1,7 @@
+source 'https://rubygems.org'
+gemspec
+
+gem "railties", github: "rails/rails"
+gem "activemodel", github: "rails/rails"
+gem "journey", github: "rails/journey"
+gem "sprockets-rails", github: "rails/sprockets-rails"
View
@@ -19,8 +19,8 @@ the asset pipeline and engines.}
gem.require_paths = ["lib"]
gem.version = "2.1.0"
- gem.add_dependency "railties", "~> 3.1"
- gem.add_dependency "actionpack", "~> 3.1"
+ gem.add_dependency "railties", ">= 3.1", "< 5"
+ gem.add_dependency "actionpack", ">= 3.1", "< 5"
gem.add_dependency "sprockets"
gem.add_dependency "capybara", "~> 2.0"
gem.add_dependency "colorize"
@@ -2,6 +2,7 @@
require "action_controller/railtie"
require "action_view/railtie"
+require "active_model/railtie" # https://github.com/rspec/rspec-rails/pull/642
require "sprockets/railtie"
if defined?(Bundler)
@@ -6,8 +6,8 @@
# since you don't have to restart the web server when you make code changes.
config.cache_classes = false
- # Log error messages when you accidentally call methods on nil.
- config.whiny_nils = true
+ # Do not eager load in development.
+ config.eager_load = false
# Show full error reports and disable caching
config.consider_all_requests_local = true
@@ -0,0 +1,12 @@
+# Be sure to restart your server when you modify this file.
+
+# Your secret key for verifying the integrity of signed cookies.
+# If you change this key, all old signed cookies will become invalid!
+
+# Make sure the secret is at least 30 characters and all random,
+# no regular words or you'll be exposed to dictionary attacks.
+# You can use `rake secret` to generate a secure secret key.
+
+# Make sure your secret_key_base is kept private
+# if you're sharing your code publicly.
+Dummy::Application.config.secret_key_base = '58633e8901c06c9cd6484fcc4fee564f1329e8b5c44c93101479868598ce73ffb1438ee6a0f819ab719c4724683434f7d78285ba0badd06440d64bb6417f84dc'
@@ -12,19 +12,20 @@ def spec_double(asset_name)
it "renders a script tag for @spec" do
assign(:spec, spec_double("a_spec"))
- render
+ view.stub(:javascript_include_tag)
+ view.should_receive(:javascript_include_tag).with("a_spec")
- rendered.should have_selector("script[src='/assets/a_spec.js']")
+ render
end
it "renders the stylesheets" do
assign(:spec, spec_double("a_spec"))
assign(:stylesheets, %w(foo bar))
- render
+ view.should_receive(:stylesheet_link_tag).with("foo", :debug => false)
+ view.should_receive(:stylesheet_link_tag).with("bar", :debug => false)
- rendered.should have_selector("link[href='/assets/foo.css']")
- rendered.should have_selector("link[href='/assets/bar.css']")
+ render
end
it "includes a path data attribute" do

0 comments on commit 1fc9cb8

Please sign in to comment.