-
Notifications
You must be signed in to change notification settings - Fork 0
/
rails.txt
74 lines (45 loc) · 1.33 KB
/
rails.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
bundle install only when you change gem file
rails console
Album.all
Album.find(1).price
gem 'annotate'
group :test, :development do
gem 'cucumber-rails', :require => false #
gem 'cucumber-rails-training-wheels'
gem 'database_cleaner'
gem 'capybara'
gem 'launchy' # os agnostic
end
annotate
annotate --routes
schema: overall picture of the database
BDD: cucumber
rails g cucumber:install capybara
rails g cucumber_rails_training_wheels:install # create features for this project
in features/: add AddAlbum.feature
Feature: Album submission
As a user
so that I can track my albums
I want to add a new album to the list
Scenarios: Add an album
Given I am on the album creation page
When I add a new album
Then I should see the newly created album
run:
cucumber
in features/steps_definitions add album_steps.rb
Given(/^I'm on the album creation page$/) do
visit new_album_path
end
When(/^I add a new album$/) do
fill_in 'Name', :with => "Lullaby"
fill_in 'Price', :with => "11.66"
click_button 'Create Album'
end
Then(/^I should see the newly created album$/) do
assert page.has_content?("Album was successfully created")
end
run:
rake db:test:prepare
Album successful!!!
how to add a folder? all? add * or add .