Browse files

Add basic RSpec setup

  • Loading branch information...
1 parent b46cf9a commit 8084f386d7769ef232e2a40f4682be46583bccc5 @spohlenz committed Feb 21, 2012
Showing with 24 additions and 1 deletion.
  1. +1 −0 .rspec
  2. +5 −1 Gemfile
  3. +7 −0 spec/lib/tinymce_spec.rb
  4. +11 −0 spec/spec_helper.rb
View
1 .rspec
@@ -0,0 +1 @@
+--colour
View
6 Gemfile
@@ -1,10 +1,14 @@
source :rubygems
#gem 'rails', '3.1.0'
-gem 'rails', '3.2.0'
+gem 'rails', '3.2.1'
gem 'jquery-rails'
gem 'uglifier'
gem 'json', :platforms => [:ruby_18]
+group :test do
+ gem "rspec-rails"
+end
+
gemspec
View
7 spec/lib/tinymce_spec.rb
@@ -0,0 +1,7 @@
+require 'spec_helper'
+
+describe TinyMCE do
+ it "has a base path" do
+ TinyMCE.base.should eq("/assets/tinymce")
+ end
+end
View
11 spec/spec_helper.rb
@@ -0,0 +1,11 @@
+ENV["RAILS_ENV"] ||= 'test'
+require File.expand_path("../../sandbox/config/environment", __FILE__)
+require 'rspec/rails'
+require 'rspec/autorun'
+
+# Requires supporting ruby files with custom matchers and macros, etc,
+# in spec/support/ and its subdirectories.
+Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
+
+RSpec.configure do |config|
+end

0 comments on commit 8084f38

Please sign in to comment.