Permalink
Browse files

Added scaffolding for running tests against dummy rails app

  • Loading branch information...
1 parent 6be09a6 commit 686100933b5e1da7192e891e5ea95d4cbed403b0 @rmm5t rmm5t committed Feb 10, 2013
View
@@ -1,2 +1,12 @@
#!/usr/bin/env rake
require "bundler/gem_tasks"
+require "rake/testtask"
+
+Rake::TestTask.new(:test) do |t|
+ t.libs << "lib"
+ t.libs << "test"
+ t.pattern = "test/**/*_test.rb"
+ t.verbose = false
+end
+
+task :default => :test
@@ -16,5 +16,7 @@ Gem::Specification.new do |gem|
gem.version = Font::Awesome::Rails::VERSION
gem.add_dependency "railties", ">= 3.1"
- gem.add_development_dependency "rake"
+
+ gem.add_development_dependency "activesupport"
+ gem.add_development_dependency "tzinfo"
end
View
@@ -0,0 +1,2 @@
+/log
+/tmp
View
@@ -0,0 +1,4 @@
+# This file is used by Rack-based servers to start the application.
+
+require ::File.expand_path('../config/environment', __FILE__)
+run Dummy::Application
@@ -0,0 +1,15 @@
+require File.expand_path('../boot', __FILE__)
+
+# require "rails/all"
+require "sprockets/railtie"
+
+Bundler.require
+require "font-awesome-rails"
+
+module Dummy
+ class Application < Rails::Application
+ config.encoding = "utf-8"
+ config.assets.enabled = true
+ config.assets.version = '1.0'
+ end
+end
View
@@ -0,0 +1,10 @@
+require 'rubygems'
+gemfile = File.expand_path('../../../../Gemfile', __FILE__)
+
+if File.exist?(gemfile)
+ ENV['BUNDLE_GEMFILE'] = gemfile
+ require 'bundler'
+ Bundler.setup
+end
+
+$:.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,5 @@
+# Load the rails application
+require File.expand_path('../application', __FILE__)
+
+# Initialize the rails application
+Dummy::Application.initialize!
@@ -0,0 +1,7 @@
+# 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.
+Dummy::Application.config.secret_token = '734142099bb34ad2a267bb95111490234357e4c7026be61a66b0c14343daa2ac44822fd513264d532fb39be241a7e06d598790641f241310794bcb5dda7c8ed4'
@@ -0,0 +1,2 @@
+Dummy::Application.routes.draw do
+end
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class FontAwesomeRailsTest < ActionDispatch::IntegrationTest
+ test "engine is loaded" do
+ assert_equal ::Rails::Engine, Font::Awesome::Rails::Engine.superclass
+ end
+end
View
@@ -0,0 +1,7 @@
+# Configure Rails Environment
+ENV["RAILS_ENV"] = "test"
+
+require File.expand_path("../dummy/config/environment.rb", __FILE__)
+require "rails/test_help"
+
+Rails.backtrace_cleaner.remove_silencers!

0 comments on commit 6861009

Please sign in to comment.