jabe 0.5.9 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. data/{LICENSE.txt → MIT-LICENSE} +1 -1
  2. data/README.textile +46 -31
  3. data/Rakefile +30 -47
  4. data/app/assets/images/jabe/delete.png +0 -0
  5. data/{public/images → app/assets/images/jabe}/delete_page.png +0 -0
  6. data/{public/images → app/assets/images/jabe}/full_page.png +0 -0
  7. data/{public/images → app/assets/images/jabe}/gravatar.gif +0 -0
  8. data/{public/javascripts → app/assets/javascripts/jabe}/application.js +15 -0
  9. data/{public/javascripts → app/assets/javascripts/jabe}/libs/dd_belatedpng.js +0 -0
  10. data/{public/javascripts → app/assets/javascripts/jabe}/libs/modernizr-1.6.min.js +0 -0
  11. data/{public/javascripts → app/assets/javascripts/jabe}/plugins.js +0 -0
  12. data/app/assets/stylesheets/jabe/application.css +3 -0
  13. data/app/{stylesheets → assets/stylesheets/jabe}/boilerplate.scss +0 -0
  14. data/app/{stylesheets → assets/stylesheets/jabe}/jabe.scss +47 -8
  15. data/app/controllers/jabe/admin/base_controller.rb +7 -0
  16. data/app/controllers/jabe/admin/entries_controller.rb +49 -0
  17. data/app/controllers/jabe/admin/settings_controller.rb +13 -0
  18. data/app/controllers/jabe/application_controller.rb +5 -0
  19. data/app/controllers/jabe/comments_controller.rb +34 -0
  20. data/app/controllers/jabe/entries_controller.rb +30 -0
  21. data/app/controllers/jabe/feed_controller.rb +8 -0
  22. data/app/controllers/jabe/sessions_controller.rb +4 -0
  23. data/app/helpers/jabe/application_helper.rb +25 -0
  24. data/app/mailers/jabe/comment_mailer.rb +12 -0
  25. data/app/models/jabe/admin.rb +11 -0
  26. data/app/models/jabe/comment.rb +35 -0
  27. data/app/models/jabe/entry.rb +22 -0
  28. data/app/models/jabe/settings.rb +14 -0
  29. data/app/views/{admin → jabe/admin}/entries/_form.html.haml +1 -1
  30. data/app/views/{admin → jabe/admin}/entries/edit.html.haml +0 -0
  31. data/app/views/{admin → jabe/admin}/entries/index.html.haml +9 -7
  32. data/app/views/{admin → jabe/admin}/entries/new.html.haml +0 -0
  33. data/app/views/{admin → jabe/admin}/settings/edit.html.haml +2 -1
  34. data/app/views/jabe/comment_mailer/notification.html.erb +19 -0
  35. data/app/views/jabe/confirmations/new.html.erb +15 -0
  36. data/app/views/{entries → jabe/entries}/index.html.haml +4 -3
  37. data/app/views/jabe/entries/show.html.haml +49 -0
  38. data/app/views/{feed → jabe/feed}/index.xml.builder +3 -3
  39. data/app/views/jabe/mailer/confirmation_instructions.html.erb +5 -0
  40. data/app/views/jabe/mailer/reset_password_instructions.html.erb +8 -0
  41. data/app/views/jabe/mailer/unlock_instructions.html.erb +7 -0
  42. data/app/views/jabe/passwords/edit.html.erb +19 -0
  43. data/app/views/jabe/passwords/new.html.erb +15 -0
  44. data/app/views/jabe/registrations/edit.html.erb +22 -0
  45. data/app/views/jabe/registrations/new.html.erb +17 -0
  46. data/app/views/jabe/sessions/new.html.erb +15 -0
  47. data/app/views/jabe/shared/_links.erb +25 -0
  48. data/app/views/jabe/unlocks/new.html.erb +15 -0
  49. data/app/views/layouts/jabe/_flashes.html.haml +3 -0
  50. data/app/views/layouts/{_footer.html.haml → jabe/_footer.html.haml} +0 -0
  51. data/app/views/layouts/jabe/_header.html.haml +4 -0
  52. data/app/views/layouts/jabe/_sidebar.html.haml +21 -0
  53. data/app/views/layouts/jabe/application.html.haml +63 -0
  54. data/{test/dummy/vendor/plugins/acts_as_textiled/init.rb → config/initializers/acts_as_textiled.rb} +2 -1
  55. data/config/initializers/devise.rb +3 -0
  56. data/config/initializers/settings.rb +5 -5
  57. data/config/initializers/simple_form.rb +93 -0
  58. data/config/initializers/time_formats.rb +1 -2
  59. data/config/locales/simple_form.en.yml +24 -0
  60. data/config/routes.rb +10 -5
  61. data/{test/dummy/db/migrate/20101229224027_create_settings.rb → db/migrate/20101230010434_create_settings.rb} +7 -2
  62. data/{lib/generators/jabe/templates/migrations/devise_create_admins.rb → db/migrate/20101230010436_devise_create_admins.rb} +6 -6
  63. data/{test/dummy/db/migrate/20101229224030_create_entries.rb → db/migrate/20101230010437_create_entries.rb} +2 -2
  64. data/{test/dummy/db/migrate/20101229224031_create_comments.rb → db/migrate/20101230010438_create_comments.rb} +3 -4
  65. data/{test/dummy/vendor/plugins/acts_as_textiled/lib/acts_as_textiled.rb → lib/acts_as_textiled/base.rb} +0 -0
  66. data/lib/jabe.rb +7 -15
  67. data/lib/jabe/engine.rb +5 -0
  68. data/lib/jabe/version.rb +3 -0
  69. data/lib/tasks/jabe_tasks.rake +4 -0
  70. metadata +187 -601
  71. data/Gemfile +0 -35
  72. data/Gemfile.lock +0 -214
  73. data/VERSION +0 -1
  74. data/app/controllers/admin/base_controller.rb +0 -3
  75. data/app/controllers/admin/entries_controller.rb +0 -42
  76. data/app/controllers/admin/settings_controller.rb +0 -11
  77. data/app/controllers/comments_controller.rb +0 -25
  78. data/app/controllers/entries_controller.rb +0 -26
  79. data/app/controllers/feed_controller.rb +0 -8
  80. data/app/helpers/jabe_helper.rb +0 -13
  81. data/app/models/admin.rb +0 -9
  82. data/app/models/comment.rb +0 -22
  83. data/app/models/entry.rb +0 -17
  84. data/app/models/settings.rb +0 -7
  85. data/app/stylesheets/_will_paginate.scss +0 -102
  86. data/app/stylesheets/handheld.scss +0 -7
  87. data/app/views/entries/_comment_form.html.haml +0 -3
  88. data/app/views/entries/show.html.haml +0 -38
  89. data/app/views/layouts/_header.html.haml +0 -4
  90. data/app/views/layouts/_sidebar.html.haml +0 -21
  91. data/app/views/layouts/application.html.haml +0 -59
  92. data/config/initializers/sass.rb +0 -5
  93. data/lib/generators/jabe/migrations/migrations_generator.rb +0 -38
  94. data/lib/generators/jabe/stylesheets/stylesheets_generator.rb +0 -9
  95. data/lib/generators/jabe/templates/migrations/add_new_settings.rb +0 -17
  96. data/lib/generators/jabe/templates/migrations/create_comments.rb +0 -20
  97. data/lib/generators/jabe/templates/migrations/create_entries.rb +0 -16
  98. data/lib/generators/jabe/templates/migrations/create_settings.rb +0 -21
  99. data/lib/generators/jabe/templates/migrations/create_slugs.rb +0 -18
  100. data/public/.htaccess +0 -220
  101. data/public/apple-touch-icon.png +0 -0
  102. data/public/blackbird/blackbird.css +0 -80
  103. data/public/blackbird/blackbird.js +0 -365
  104. data/public/blackbird/blackbird.png +0 -0
  105. data/public/crossdomain.xml +0 -25
  106. data/public/javascripts/jquery-ui.js +0 -11511
  107. data/public/javascripts/jquery-ui.min.js +0 -404
  108. data/public/javascripts/jquery.js +0 -7179
  109. data/public/javascripts/jquery.min.js +0 -167
  110. data/public/javascripts/libs/profiling/charts.swf +0 -0
  111. data/public/javascripts/libs/profiling/config.js +0 -59
  112. data/public/javascripts/libs/profiling/yahoo-profiling.css +0 -7
  113. data/public/javascripts/libs/profiling/yahoo-profiling.min.js +0 -39
  114. data/public/javascripts/rails.js +0 -154
  115. data/public/nginx.conf +0 -108
  116. data/public/robots.txt +0 -5
  117. data/test/dummy/app/controllers/application_controller.rb +0 -3
  118. data/test/dummy/app/helpers/application_helper.rb +0 -2
  119. data/test/dummy/config/application.rb +0 -52
  120. data/test/dummy/config/boot.rb +0 -10
  121. data/test/dummy/config/environment.rb +0 -5
  122. data/test/dummy/config/environments/development.rb +0 -26
  123. data/test/dummy/config/environments/production.rb +0 -49
  124. data/test/dummy/config/environments/test.rb +0 -35
  125. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  126. data/test/dummy/config/initializers/devise.rb +0 -142
  127. data/test/dummy/config/initializers/inflections.rb +0 -10
  128. data/test/dummy/config/initializers/mime_types.rb +0 -5
  129. data/test/dummy/config/initializers/secret_token.rb +0 -7
  130. data/test/dummy/config/initializers/session_store.rb +0 -8
  131. data/test/dummy/config/routes.rb +0 -58
  132. data/test/dummy/db/migrate/20101229224028_create_slugs.rb +0 -18
  133. data/test/dummy/db/migrate/20101229224029_devise_create_admins.rb +0 -26
  134. data/test/dummy/db/migrate/20110104004400_add_new_settings.rb +0 -17
  135. data/test/dummy/db/schema.rb +0 -110
  136. data/test/dummy/features/step_definitions/admin_steps.rb +0 -14
  137. data/test/dummy/features/step_definitions/email_steps.rb +0 -194
  138. data/test/dummy/features/step_definitions/entry_steps.rb +0 -54
  139. data/test/dummy/features/step_definitions/support_steps.rb +0 -3
  140. data/test/dummy/features/step_definitions/web_steps.rb +0 -219
  141. data/test/dummy/features/support/blueprints.rb +0 -37
  142. data/test/dummy/features/support/env.rb +0 -59
  143. data/test/dummy/features/support/paths.rb +0 -39
  144. data/test/dummy/spec/spec_helper.rb +0 -0
  145. data/test/dummy/spec/support/blueprints.rb +0 -9
  146. data/test/dummy/vendor/plugins/acts_as_textiled/test/fixtures/author.rb +0 -4
  147. data/test/dummy/vendor/plugins/acts_as_textiled/test/fixtures/story.rb +0 -4
  148. data/test/dummy/vendor/plugins/acts_as_textiled/test/helper.rb +0 -87
  149. data/test/dummy/vendor/plugins/acts_as_textiled/test/textiled_test.rb +0 -145
@@ -1,18 +0,0 @@
1
- class CreateSlugs < ActiveRecord::Migration
2
- def self.up
3
- create_table :slugs do |t|
4
- t.string :name
5
- t.integer :sluggable_id
6
- t.integer :sequence, :null => false, :default => 1
7
- t.string :sluggable_type, :limit => 40
8
- t.string :scope
9
- t.datetime :created_at
10
- end
11
- add_index :slugs, :sluggable_id
12
- add_index :slugs, [:name, :sluggable_type, :sequence, :scope], :name => "index_slugs_on_n_s_s_and_s", :unique => true
13
- end
14
-
15
- def self.down
16
- drop_table :slugs
17
- end
18
- end
@@ -1,26 +0,0 @@
1
- class DeviseCreateAdmins < ActiveRecord::Migration
2
- def self.up
3
- create_table(:admins) do |t|
4
- t.database_authenticatable :null => false
5
- t.recoverable
6
- t.rememberable
7
- t.trackable
8
-
9
- # t.confirmable
10
- # t.lockable :lock_strategy => :failed_attempts, :unlock_strategy => :both
11
- # t.token_authenticatable
12
-
13
-
14
- t.timestamps
15
- end
16
-
17
- add_index :admins, :email, :unique => true
18
- add_index :admins, :reset_password_token, :unique => true
19
- # add_index :admins, :confirmation_token, :unique => true
20
- # add_index :admins, :unlock_token, :unique => true
21
- end
22
-
23
- def self.down
24
- drop_table :admins
25
- end
26
- end
@@ -1,17 +0,0 @@
1
- class AddNewSettings < ActiveRecord::Migration
2
- def self.up
3
- add_column :settings, :sidebar_heading, :string
4
- add_column :settings, :github_username, :string
5
- add_column :settings, :twitter_username, :string
6
- add_column :settings, :show_github_badge, :boolean
7
- add_column :settings, :facebook_url, :string
8
- end
9
-
10
- def self.down
11
- # remove_column :settings, :sidebar_heading
12
- remove_column :settings, :facebook_url
13
- remove_column :settings, :show_github_badge
14
- remove_column :settings, :twitter_username
15
- remove_column :settings, :github_username
16
- end
17
- end
@@ -1,110 +0,0 @@
1
- # This file is auto-generated from the current state of the database. Instead
2
- # of editing this file, please use the migrations feature of Active Record to
3
- # incrementally modify your database, and then regenerate this schema definition.
4
- #
5
- # Note that this schema.rb definition is the authoritative source for your
6
- # database schema. If you need to create the application database on another
7
- # system, you should be using db:schema:load, not running all the migrations
8
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
- # you'll amass, the slower it'll run and the greater likelihood for issues).
10
- #
11
- # It's strongly recommended to check this file into your version control system.
12
-
13
- ActiveRecord::Schema.define(:version => 20110104004400) do
14
-
15
- create_table "admins", :force => true do |t|
16
- t.string "email", :default => "", :null => false
17
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
18
- t.string "password_salt", :default => "", :null => false
19
- t.string "reset_password_token"
20
- t.string "remember_token"
21
- t.datetime "remember_created_at"
22
- t.integer "sign_in_count", :default => 0
23
- t.datetime "current_sign_in_at"
24
- t.datetime "last_sign_in_at"
25
- t.string "current_sign_in_ip"
26
- t.string "last_sign_in_ip"
27
- t.datetime "created_at"
28
- t.datetime "updated_at"
29
- end
30
-
31
- add_index "admins", ["email"], :name => "index_admins_on_email", :unique => true
32
- add_index "admins", ["reset_password_token"], :name => "index_admins_on_reset_password_token", :unique => true
33
-
34
- create_table "authors", :force => true do |t|
35
- t.string "email", :default => "", :null => false
36
- t.string "encrypted_password", :limit => 128, :default => "", :null => false
37
- t.string "password_salt", :default => "", :null => false
38
- t.string "reset_password_token"
39
- t.string "remember_token"
40
- t.datetime "remember_created_at"
41
- t.integer "sign_in_count", :default => 0
42
- t.datetime "current_sign_in_at"
43
- t.datetime "last_sign_in_at"
44
- t.string "current_sign_in_ip"
45
- t.string "last_sign_in_ip"
46
- t.integer "failed_attempts", :default => 0
47
- t.string "unlock_token"
48
- t.datetime "locked_at"
49
- t.datetime "created_at"
50
- t.datetime "updated_at"
51
- end
52
-
53
- add_index "authors", ["email"], :name => "index_authors_on_email", :unique => true
54
- add_index "authors", ["reset_password_token"], :name => "index_authors_on_reset_password_token", :unique => true
55
- add_index "authors", ["unlock_token"], :name => "index_authors_on_unlock_token", :unique => true
56
-
57
- create_table "comments", :force => true do |t|
58
- t.integer "entry_id"
59
- t.string "name"
60
- t.string "email"
61
- t.text "body"
62
- t.datetime "created_at"
63
- t.datetime "updated_at"
64
- t.string "url"
65
- end
66
-
67
- add_index "comments", ["entry_id"], :name => "index_comments_on_entry_id"
68
-
69
- create_table "entries", :force => true do |t|
70
- t.string "title"
71
- t.text "body"
72
- t.boolean "draft"
73
- t.datetime "published_at"
74
- t.datetime "created_at"
75
- t.datetime "updated_at"
76
- t.string "cached_slug"
77
- end
78
-
79
- create_table "settings", :force => true do |t|
80
- t.string "site_url"
81
- t.string "host_name"
82
- t.string "mail_from"
83
- t.string "site_name"
84
- t.string "tagline"
85
- t.string "google_tracker_id"
86
- t.boolean "blackbird_enabled"
87
- t.datetime "created_at"
88
- t.datetime "updated_at"
89
- t.integer "entries_per_page"
90
- t.string "time_zone"
91
- t.string "sidebar_heading"
92
- t.string "github_username"
93
- t.string "twitter_username"
94
- t.boolean "show_github_badge"
95
- t.string "facebook_url"
96
- end
97
-
98
- create_table "slugs", :force => true do |t|
99
- t.string "name"
100
- t.integer "sluggable_id"
101
- t.integer "sequence", :default => 1, :null => false
102
- t.string "sluggable_type", :limit => 40
103
- t.string "scope"
104
- t.datetime "created_at"
105
- end
106
-
107
- add_index "slugs", ["name", "sluggable_type", "sequence", "scope"], :name => "index_slugs_on_n_s_s_and_s", :unique => true
108
- add_index "slugs", ["sluggable_id"], :name => "index_slugs_on_sluggable_id"
109
-
110
- end
@@ -1,14 +0,0 @@
1
- Given /^a logged in admin$/ do
2
- @admin ||= Admin.make!
3
- steps %Q{
4
- When I go to the admin home page
5
- And I fill in "admin_email" with "admin@example.com"
6
- And I fill in "admin_password" with "password"
7
- And I press "Sign in"
8
- Then I should be on the admin home page
9
- }
10
- end
11
-
12
- Then /^I should see the settings options$/ do
13
- pending # express the regexp above with the code you wish you had
14
- end
@@ -1,194 +0,0 @@
1
- # Commonly used email steps
2
- #
3
- # To add your own steps make a custom_email_steps.rb
4
- # The provided methods are:
5
- #
6
- # last_email_address
7
- # reset_mailer
8
- # open_last_email
9
- # visit_in_email
10
- # unread_emails_for
11
- # mailbox_for
12
- # current_email
13
- # open_email
14
- # read_emails_for
15
- # find_email
16
- #
17
- # General form for email scenarios are:
18
- # - clear the email queue (done automatically by email_spec)
19
- # - execute steps that sends an email
20
- # - check the user received an/no/[0-9] emails
21
- # - open the email
22
- # - inspect the email contents
23
- # - interact with the email (e.g. click links)
24
- #
25
- # The Cucumber steps below are setup in this order.
26
-
27
- module EmailHelpers
28
- def current_email_address
29
- # Replace with your a way to find your current email. e.g @current_user.email
30
- # last_email_address will return the last email address used by email spec to find an email.
31
- # Note that last_email_address will be reset after each Scenario.
32
- last_email_address || "example@example.com"
33
- end
34
- end
35
-
36
- World(EmailHelpers)
37
-
38
- #
39
- # Reset the e-mail queue within a scenario.
40
- # This is done automatically before each scenario.
41
- #
42
-
43
- Given /^(?:a clear email queue|no emails have been sent)$/ do
44
- reset_mailer
45
- end
46
-
47
- #
48
- # Check how many emails have been sent/received
49
- #
50
-
51
- Then /^(?:I|they|"([^"]*?)") should receive (an|no|\d+) emails?$/ do |address, amount|
52
- unread_emails_for(address).size.should == parse_email_count(amount)
53
- end
54
-
55
- Then /^(?:I|they|"([^"]*?)") should have (an|no|\d+) emails?$/ do |address, amount|
56
- mailbox_for(address).size.should == parse_email_count(amount)
57
- end
58
-
59
- Then /^(?:I|they|"([^"]*?)") should receive (an|no|\d+) emails? with subject "([^"]*?)"$/ do |address, amount, subject|
60
- unread_emails_for(address).select { |m| m.subject =~ Regexp.new(subject) }.size.should == parse_email_count(amount)
61
- end
62
-
63
- Then /^(?:I|they|"([^"]*?)") should receive an email with the following body:$/ do |address, expected_body|
64
- open_email(address, :with_text => expected_body)
65
- end
66
-
67
- #
68
- # Accessing emails
69
- #
70
-
71
- # Opens the most recently received email
72
- When /^(?:I|they|"([^"]*?)") opens? the email$/ do |address|
73
- open_email(address)
74
- end
75
-
76
- When /^(?:I|they|"([^"]*?)") opens? the email with subject "([^"]*?)"$/ do |address, subject|
77
- open_email(address, :with_subject => subject)
78
- end
79
-
80
- When /^(?:I|they|"([^"]*?)") opens? the email with text "([^"]*?)"$/ do |address, text|
81
- open_email(address, :with_text => text)
82
- end
83
-
84
- #
85
- # Inspect the Email Contents
86
- #
87
-
88
- Then /^(?:I|they) should see "([^"]*?)" in the email subject$/ do |text|
89
- current_email.should have_subject(text)
90
- end
91
-
92
- Then /^(?:I|they) should see \/([^"]*?)\/ in the email subject$/ do |text|
93
- current_email.should have_subject(Regexp.new(text))
94
- end
95
-
96
- Then /^(?:I|they) should see "([^"]*?)" in the email body$/ do |text|
97
- current_email.default_part_body.to_s.should include(text)
98
- end
99
-
100
- Then /^(?:I|they) should see \/([^"]*?)\/ in the email body$/ do |text|
101
- current_email.default_part_body.to_s.should =~ Regexp.new(text)
102
- end
103
-
104
- Then /^(?:I|they) should see the email delivered from "([^"]*?)"$/ do |text|
105
- current_email.should be_delivered_from(text)
106
- end
107
-
108
- Then /^(?:I|they) should see "([^\"]*)" in the email "([^"]*?)" header$/ do |text, name|
109
- current_email.should have_header(name, text)
110
- end
111
-
112
- Then /^(?:I|they) should see \/([^\"]*)\/ in the email "([^"]*?)" header$/ do |text, name|
113
- current_email.should have_header(name, Regexp.new(text))
114
- end
115
-
116
- Then /^I should see it is a multi\-part email$/ do
117
- current_email.should be_multipart
118
- end
119
-
120
- Then /^(?:I|they) should see "([^"]*?)" in the email html part body$/ do |text|
121
- current_email.html_part.body.to_s.should include(text)
122
- end
123
-
124
- Then /^(?:I|they) should see "([^"]*?)" in the email text part body$/ do |text|
125
- current_email.text_part.body.to_s.should include(text)
126
- end
127
-
128
- #
129
- # Inspect the Email Attachments
130
- #
131
-
132
- Then /^(?:I|they) should see (an|no|\d+) attachments? with the email$/ do |amount|
133
- current_email_attachments.size.should == parse_email_count(amount)
134
- end
135
-
136
- Then /^there should be (an|no|\d+) attachments? named "([^"]*?)"$/ do |amount, filename|
137
- current_email_attachments.select { |a| a.filename == filename }.size.should == parse_email_count(amount)
138
- end
139
-
140
- Then /^attachment (\d+) should be named "([^"]*?)"$/ do |index, filename|
141
- current_email_attachments[(index.to_i - 1)].filename.should == filename
142
- end
143
-
144
- Then /^there should be (an|no|\d+) attachments? of type "([^"]*?)"$/ do |amount, content_type|
145
- current_email_attachments.select { |a| a.content_type.include?(content_type) }.size.should == parse_email_count(amount)
146
- end
147
-
148
- Then /^attachment (\d+) should be of type "([^"]*?)"$/ do |index, content_type|
149
- current_email_attachments[(index.to_i - 1)].content_type.should include(content_type)
150
- end
151
-
152
- Then /^all attachments should not be blank$/ do
153
- current_email_attachments.each do |attachment|
154
- attachment.read.size.should_not == 0
155
- end
156
- end
157
-
158
- Then /^show me a list of email attachments$/ do
159
- EmailSpec::EmailViewer::save_and_open_email_attachments_list(current_email)
160
- end
161
-
162
- #
163
- # Interact with Email Contents
164
- #
165
-
166
- When /^(?:I|they) follow "([^"]*?)" in the email$/ do |link|
167
- visit_in_email(link)
168
- end
169
-
170
- When /^(?:I|they) click the first link in the email$/ do
171
- click_first_link_in_email
172
- end
173
-
174
- #
175
- # Debugging
176
- # These only work with Rails and OSx ATM since EmailViewer uses RAILS_ROOT and OSx's 'open' command.
177
- # Patches accepted. ;)
178
- #
179
-
180
- Then /^save and open current email$/ do
181
- EmailSpec::EmailViewer::save_and_open_email(current_email)
182
- end
183
-
184
- Then /^save and open all text emails$/ do
185
- EmailSpec::EmailViewer::save_and_open_all_text_emails
186
- end
187
-
188
- Then /^save and open all html emails$/ do
189
- EmailSpec::EmailViewer::save_and_open_all_html_emails
190
- end
191
-
192
- Then /^save and open all raw emails$/ do
193
- EmailSpec::EmailViewer::save_and_open_all_raw_emails
194
- end
@@ -1,54 +0,0 @@
1
- Given /^a published entry$/ do
2
- Entry.make!(:published)
3
- end
4
-
5
- Given /^(\d+) entries$/ do |count|
6
- count.to_i.times do
7
- Entry.make!
8
- end
9
- end
10
-
11
- Then /^the entry should be a draft$/ do
12
- entry = @entry || Entry.last
13
- entry.draft.should be_true
14
- end
15
-
16
- Then /^I should not see the entry$/ do
17
- entry = @entry || Entry.last
18
- steps %Q{
19
- And I should not see "#{entry.title}"
20
- }
21
- end
22
-
23
- When /^I follow the title of the entry$/ do
24
- entry = @entry || Entry.last
25
- steps %Q{
26
- And I follow "#{entry.title}"
27
- }
28
- end
29
-
30
- Then /^I should see the entry$/ do
31
- entry = @entry || Entry.last
32
- steps %Q{
33
- And I should see "#{entry.title}"
34
- And I should see "#{entry.body(:source)}"
35
- }
36
- end
37
-
38
- Then /^the entry should have (\d+) comments?$/ do |count|
39
- entry = @entry || Entry.last
40
- entry.comments.count.should eql(count.to_i)
41
- end
42
-
43
- Then /^I should see the entries in the feed$/ do
44
- doc = Nokogiri::XML(page.body)
45
- entries = doc.css('entry')
46
-
47
- Entry.published.paginate(
48
- :page => 1,
49
- :per_page => (SETTINGS.entries_per_page || 5)
50
- ).each_with_index do |entry, idx|
51
- entries[idx].css('title').text.should eql(entry.title)
52
- entries[idx].css('content').text.should eql(entry.body)
53
- end
54
- end
@@ -1,3 +0,0 @@
1
- Then /^the response should be a (\d+)$/ do |status|
2
- page.driver.response.status.should eql(status.to_i)
3
- end