Browse Source

rspec, factoryes, etc

pull/1/head
Nicolae Claudius 13 years ago
parent
commit
6b55195a92
  1. 1
      .rspec
  2. 4
      Gemfile
  3. 24
      Gemfile.lock
  4. 1
      app/views/home/index.html.erb
  5. 15
      spec/factories.rb
  6. 22
      spec/spec_helper.rb

1
.rspec

@ -0,0 +1 @@
--colour

4
Gemfile

@ -20,6 +20,8 @@ gem 'sentient_user', '~> 0.3.2'
gem 'active_scaffold', '~> 3.1.0', :git => 'https://github.com/activescaffold/active_scaffold.git'
gem 'web-app-theme', :git => "git://github.com/tscolari/web-app-theme.git", :branch => "v3.1.0"
gem "pjax-rails", "~> 0.1.4"
gem "rails_config", "~> 0.2.4"
# gem "rails-settings-cached", :require => "rails-settings"
# Gems used only for assets and not required
# in production environments by default.
@ -36,7 +38,7 @@ gem 'jquery-rails'
group :test, :development do
gem "rspec-rails", "~> 2.6.1"
gem 'capybara', '~> 1.1.1'
# gem 'capybara', '~> 1.1.1'
end
group :test do

24
Gemfile.lock

@ -48,15 +48,6 @@ GEM
arel (2.2.1)
bcrypt-ruby (3.0.1)
builder (3.0.0)
capybara (1.1.1)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
selenium-webdriver (~> 2.0)
xpath (~> 0.1.4)
childprocess (0.2.2)
ffi (~> 1.0.6)
chunky_png (1.2.1)
coffee-rails (3.1.1)
coffee-script (>= 2.2.0)
@ -81,14 +72,12 @@ GEM
factory_girl_rails (1.2.0)
factory_girl (~> 2.1.0)
railties (>= 3.0.0)
ffi (1.0.9)
fssm (0.2.7)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.14)
railties (~> 3.0)
thor (~> 0.14)
json_pure (1.6.0)
libv8 (3.3.10.2)
mail (2.3.0)
i18n (>= 0.4.0)
@ -96,7 +85,6 @@ GEM
treetop (~> 1.4.8)
mime-types (1.16)
multi_json (1.0.3)
nokogiri (1.5.0)
orm_adapter (0.0.5)
pg (0.11.0)
pjax-rails (0.1.4)
@ -119,6 +107,8 @@ GEM
activesupport (= 3.1.0)
bundler (~> 1.0)
railties (= 3.1.0)
rails_config (0.2.4)
activesupport (>= 3.0)
railties (3.1.0)
actionpack (= 3.1.0)
activesupport (= 3.1.0)
@ -141,7 +131,6 @@ GEM
activesupport (~> 3.0)
railties (~> 3.0)
rspec (~> 2.6.0)
rubyzip (0.9.4)
sass (3.1.7)
sass-rails (3.1.2)
actionpack (~> 3.1.0)
@ -149,11 +138,6 @@ GEM
sass (>= 3.1.4)
sprockets (~> 2.0.0)
tilt (~> 1.3.2)
selenium-webdriver (2.6.0)
childprocess (>= 0.2.1)
ffi (>= 1.0.7)
json_pure
rubyzip
sentient_user (0.3.2)
spork (0.9.0.rc9)
sprockets (2.0.0)
@ -174,15 +158,12 @@ GEM
multi_json (>= 1.0.2)
warden (1.0.5)
rack (>= 1.0)
xpath (0.1.4)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
active_scaffold (~> 3.1.0)!
capybara (~> 1.1.1)
coffee-rails (~> 3.1.0)
compass (~> 0.11.5)
devise (~> 1.4.5)
@ -191,6 +172,7 @@ DEPENDENCIES
pg
pjax-rails (~> 0.1.4)
rails (= 3.1.0)
rails_config (~> 0.2.4)
rspec-rails (~> 2.6.1)
sass-rails (~> 3.1.0)
sentient_user (~> 0.3.2)

1
app/views/home/index.html.erb

@ -1,3 +1,4 @@
<p>Marketing ...</p>
<p>

15
spec/factories.rb

@ -0,0 +1,15 @@
FactoryGirl.define do
factory :user do
end
factory :domain do
end
factory :record do
end
end

22
spec/spec_helper.rb

@ -0,0 +1,22 @@
require 'rubygems'
require 'spork'
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
Spork.prefork do
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
RSpec.configure do |config|
config.mock_with :rspec
config.use_transactional_fixtures = true
end
end
Spork.each_run do
# 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}
end
Loading…
Cancel
Save