Skip to content

Commit 01caef8

Browse files
committed
added rspec, fabrication, cucumber, fixed requiring lib
1 parent 4236b9c commit 01caef8

24 files changed

Lines changed: 543 additions & 39 deletions

File tree

.rspec

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

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,8 @@ gem 'jquery-rails'
1919
# Use unicorn as the web server
2020
gem 'unicorn'
2121

22+
group :development, :test do
23+
gem 'fabrication'
24+
gem 'rspec-rails'
25+
gem 'cucumber-rails'
26+
end

Gemfile.lock

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,30 +33,56 @@ GEM
3333
arel (2.2.1)
3434
bcrypt-ruby (2.1.4)
3535
builder (3.0.0)
36+
capybara (1.0.1)
37+
mime-types (>= 1.16)
38+
nokogiri (>= 1.3.3)
39+
rack (>= 1.0.0)
40+
rack-test (>= 0.5.4)
41+
selenium-webdriver (~> 2.0)
42+
xpath (~> 0.1.4)
43+
childprocess (0.2.2)
44+
ffi (~> 1.0.6)
3645
coffee-rails (3.1.0.rc.6)
3746
coffee-script (>= 2.2.0)
3847
railties (~> 3.1.0.rc1)
3948
coffee-script (2.2.0)
4049
coffee-script-source
4150
execjs
4251
coffee-script-source (1.1.2)
52+
cucumber (1.0.2)
53+
builder (>= 2.1.2)
54+
diff-lcs (>= 1.1.2)
55+
gherkin (~> 2.4.5)
56+
json (>= 1.4.6)
57+
term-ansicolor (>= 1.0.5)
58+
cucumber-rails (1.0.2)
59+
capybara (>= 1.0.0)
60+
cucumber (~> 1.0.0)
61+
nokogiri (>= 1.4.6)
62+
diff-lcs (1.1.3)
4363
erubis (2.7.0)
4464
execjs (1.2.4)
4565
multi_json (~> 1.0)
66+
fabrication (1.1.0)
67+
ffi (1.0.9)
68+
gherkin (2.4.16)
69+
json (>= 1.4.6)
4670
haml (3.1.2)
4771
hike (1.2.1)
4872
i18n (0.6.0)
4973
jquery-rails (1.0.13)
5074
railties (~> 3.0)
5175
thor (~> 0.14)
5276
json (1.5.3)
77+
json_pure (1.5.3)
5378
kgio (2.6.0)
5479
mail (2.3.0)
5580
i18n (>= 0.4.0)
5681
mime-types (~> 1.16)
5782
treetop (~> 1.4.8)
5883
mime-types (1.16)
5984
multi_json (1.0.3)
85+
nokogiri (1.5.0)
6086
polyglot (0.3.2)
6187
rack (1.3.2)
6288
rack-cache (1.0.2)
@@ -85,16 +111,36 @@ GEM
85111
raindrops (0.7.0)
86112
rake (0.9.2)
87113
rdoc (3.9.4)
114+
rspec (2.6.0)
115+
rspec-core (~> 2.6.0)
116+
rspec-expectations (~> 2.6.0)
117+
rspec-mocks (~> 2.6.0)
118+
rspec-core (2.6.4)
119+
rspec-expectations (2.6.0)
120+
diff-lcs (~> 1.1.2)
121+
rspec-mocks (2.6.0)
122+
rspec-rails (2.6.1)
123+
actionpack (~> 3.0)
124+
activesupport (~> 3.0)
125+
railties (~> 3.0)
126+
rspec (~> 2.6.0)
127+
rubyzip (0.9.4)
88128
sass (3.1.7)
89129
sass-rails (3.1.0.rc.6)
90130
actionpack (~> 3.1.0.rc6)
91131
railties (~> 3.1.0.rc6)
92132
sass (>= 3.1.4)
133+
selenium-webdriver (2.5.0)
134+
childprocess (>= 0.2.1)
135+
ffi (>= 1.0.7)
136+
json_pure
137+
rubyzip
93138
sprockets (2.0.0.beta.15)
94139
hike (~> 1.2)
95140
rack (~> 1.0)
96141
tilt (~> 1.1, != 1.3.0)
97142
sqlite3 (1.3.4)
143+
term-ansicolor (1.0.6)
98144
thor (0.14.6)
99145
tilt (1.3.3)
100146
treetop (1.4.10)
@@ -108,16 +154,21 @@ GEM
108154
kgio (~> 2.4)
109155
rack
110156
raindrops (~> 0.6)
157+
xpath (0.1.4)
158+
nokogiri (~> 1.3)
111159

112160
PLATFORMS
113161
ruby
114162

115163
DEPENDENCIES
116164
coffee-rails (~> 3.1.0.rc)
165+
cucumber-rails
166+
fabrication
117167
haml
118168
jquery-rails
119169
json
120170
rails (= 3.1.0.rc6)
171+
rspec-rails
121172
sass-rails (~> 3.1.0.rc)
122173
sqlite3
123174
uglifier

config/application.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
module HacketyHackCom
1313
class Application < Rails::Application
14-
config.autoload_paths += %W(lib)
14+
config.autoload_paths += %W(#{config.root}/lib)
1515

1616
config.encoding = "utf-8"
1717

@@ -21,9 +21,10 @@ class Application < Rails::Application
2121

2222
config.generators do |g|
2323
g.template_engine :haml
24+
g.test_framework :rspec, :fixture => true
25+
g.fixture_replacement :fabrication
2426

2527
# you can also specify a different test framework or ORM here
26-
# g.test_framework :rspec
2728
# g.orm :mongoid
2829
end
2930
end

config/cucumber.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<%
2+
rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3+
rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'progress'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4+
std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
5+
%>
6+
default: <%= std_opts %> features
7+
wip: --tags @wip:3 --wip features
8+
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip

config/database.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ development:
1212
# Warning: The database defined as "test" will be erased and
1313
# re-generated from your development database when you run "rake".
1414
# Do not set this db to the same as development or production.
15-
test:
15+
test: &test
1616
adapter: sqlite3
1717
database: db/test.sqlite3
1818
pool: 5
@@ -23,3 +23,6 @@ production:
2323
database: db/production.sqlite3
2424
pool: 5
2525
timeout: 5000
26+
27+
cucumber:
28+
<<: *test

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 to check this file into your version control system.
13+
14+
ActiveRecord::Schema.define(:version => 0) do
15+
16+
end

0 commit comments

Comments
 (0)