Skip to content

Commit 868e817

Browse files
committed
rspec and haml
1 parent daf12de commit 868e817

File tree

5 files changed

+80
-28
lines changed

5 files changed

+80
-28
lines changed

.rspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--color

Gemfile

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,22 @@
11
source 'https://rubygems.org'
22

3-
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
43
gem 'rails', '4.0.0'
54

6-
# Use sqlite3 as the database for Active Record
75
gem 'sqlite3'
86

9-
# Use SCSS for stylesheets
7+
gem 'haml'
108
gem 'sass-rails', '~> 4.0.0'
11-
12-
# Use Uglifier as compressor for JavaScript assets
139
gem 'uglifier', '>= 1.3.0'
14-
15-
# Use CoffeeScript for .js.coffee assets and views
1610
gem 'coffee-rails', '~> 4.0.0'
17-
18-
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
19-
# gem 'therubyracer', platforms: :ruby
20-
21-
# Use jquery as the JavaScript library
2211
gem 'jquery-rails'
23-
24-
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
2512
gem 'turbolinks'
2613

27-
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
14+
group :development, :test do
15+
gem 'rspec-rails'
16+
end
17+
2818
gem 'jbuilder', '~> 1.2'
2919

3020
group :doc do
31-
# bundle exec rake doc:rails generates the API under doc/api.
3221
gem 'sdoc', require: false
3322
end
34-
35-
# Use ActiveModel has_secure_password
36-
# gem 'bcrypt-ruby', '~> 3.0.0'
37-
38-
# Use unicorn as the app server
39-
# gem 'unicorn'
40-
41-
# Use Capistrano for deployment
42-
# gem 'capistrano', group: :development
43-
44-
# Use debugger
45-
# gem 'debugger', group: [:development, :test]

Gemfile.lock

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ GEM
3535
coffee-script-source
3636
execjs
3737
coffee-script-source (1.6.3)
38+
diff-lcs (1.2.4)
3839
erubis (2.7.0)
3940
execjs (2.0.2)
41+
haml (4.0.3)
42+
tilt
4043
hike (1.2.3)
4144
i18n (0.6.5)
4245
jbuilder (1.5.2)
@@ -72,6 +75,17 @@ GEM
7275
rake (10.1.0)
7376
rdoc (3.12.2)
7477
json (~> 1.4)
78+
rspec-core (2.14.4)
79+
rspec-expectations (2.14.0)
80+
diff-lcs (>= 1.1.3, < 2.0)
81+
rspec-mocks (2.14.1)
82+
rspec-rails (2.14.0)
83+
actionpack (>= 3.0)
84+
activesupport (>= 3.0)
85+
railties (>= 3.0)
86+
rspec-core (~> 2.14.0)
87+
rspec-expectations (~> 2.14.0)
88+
rspec-mocks (~> 2.14.0)
7589
sass (3.2.12)
7690
sass-rails (4.0.1)
7791
railties (>= 4.0.0, < 5.0)
@@ -109,9 +123,11 @@ PLATFORMS
109123

110124
DEPENDENCIES
111125
coffee-rails (~> 4.0.0)
126+
haml
112127
jbuilder (~> 1.2)
113128
jquery-rails
114129
rails (= 4.0.0)
130+
rspec-rails
115131
sass-rails (~> 4.0.0)
116132
sdoc
117133
sqlite3

db/schema.rb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# encoding: UTF-8
2+
# This file is auto-generated from the current state of the database. Instead
3+
# of editing this file, please use the migrations feature of Active Record to
4+
# incrementally modify your database, and then regenerate this schema definition.
5+
#
6+
# Note that this schema.rb definition is the authoritative source for your
7+
# database schema. If you need to create the application database on another
8+
# system, you should be using db:schema:load, not running all the migrations
9+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
10+
# you'll amass, the slower it'll run and the greater likelihood for issues).
11+
#
12+
# It's strongly recommended that you check this file into your version control system.
13+
14+
ActiveRecord::Schema.define(version: 0) do
15+
16+
end

spec/spec_helper.rb

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# This file is copied to spec/ when you run 'rails generate rspec:install'
2+
ENV["RAILS_ENV"] ||= 'test'
3+
require File.expand_path("../../config/environment", __FILE__)
4+
require 'rspec/rails'
5+
require 'rspec/autorun'
6+
7+
# Requires supporting ruby files with custom matchers and macros, etc,
8+
# in spec/support/ and its subdirectories.
9+
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
10+
11+
# Checks for pending migrations before tests are run.
12+
# If you are not using ActiveRecord, you can remove this line.
13+
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
14+
15+
RSpec.configure do |config|
16+
# ## Mock Framework
17+
#
18+
# If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
19+
#
20+
# config.mock_with :mocha
21+
# config.mock_with :flexmock
22+
# config.mock_with :rr
23+
24+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
25+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
26+
27+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
28+
# examples within a transaction, remove the following line or assign false
29+
# instead of true.
30+
config.use_transactional_fixtures = true
31+
32+
# If true, the base class of anonymous controllers will be inferred
33+
# automatically. This will be the default behavior in future versions of
34+
# rspec-rails.
35+
config.infer_base_class_for_anonymous_controllers = false
36+
37+
# Run specs in random order to surface order dependencies. If you find an
38+
# order dependency and want to debug it, you can fix the order by providing
39+
# the seed, which is printed after each run.
40+
# --seed 1234
41+
config.order = "random"
42+
end

0 commit comments

Comments
 (0)