Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

tweak specs

  • Loading branch information...
commit 688f193f70e7f5879647fcea906b7ab91a72d900 1 parent bacf5d8
SHIBATA Hiroshi authored October 15, 2011
2  spec/acceptance/save_conf_referer_spec.rb
@@ -42,7 +42,7 @@
42 42
 		within('div.day div.refererlist') { page.should have_link "http://www.hsbt.org/" }
43 43
 	end
44 44
 
45  
-	scenario 'リンク元の置換が動いている', :mechanize => true do
  45
+	scenario 'リンク元の置換が動いている', :exclude_mechanize => true do
46 46
 		append_default_diary
47 47
 		visit '/update.rb?conf=referer'
48 48
 		fill_in 'referer_table', :with => <<-REFERER
4  spec/acceptance/save_conf_security_spec.rb
@@ -190,14 +190,14 @@
190 190
 		page.should have_content 'これはツッコミの注意文です'
191 191
 	end
192 192
 
193  
-	scenario 'スパムフィルターのログ記録の設定ができない', :secure => true do
  193
+	scenario 'スパムフィルターのログ記録の設定ができない', :exclude_no_secure => true do
194 194
 		append_default_diary
195 195
 
196 196
 		visit '/update.rb?conf=spamfilter'
197 197
 		page.should_not have_field 'filter.debug_mode'
198 198
 	end
199 199
 
200  
-	scenario 'スパムフィルターのログ記録の設定が保存される', :rack => true do
  200
+	scenario 'スパムフィルターのログ記録の設定が保存される', :exclude_secure => true do
201 201
 		append_default_diary
202 202
 
203 203
 		visit '/update.rb?conf=spamfilter'
8  spec/acceptance/support/helpers.rb
@@ -2,11 +2,11 @@
2 2
 
3 3
 module HelperMethods
4 4
 	def append_default_diary(ymd = Date.today.to_s)
5  
-		y, m, d = Date.parse(ymd).to_s.split('-').map {|t| t.sub(/^0+/, "") }
  5
+		date = Date.parse(ymd)
6 6
 		visit '/update.rb'
7  
-		fill_in "year", :with => y
8  
-		fill_in "month", :with => m
9  
-		fill_in "day", :with => d
  7
+		fill_in "year", :with => date.year
  8
+		fill_in "month", :with => date.month
  9
+		fill_in "day", :with => date.day
10 10
 		fill_in "title", :with => "tDiaryのテスト"
11 11
 		fill_in "body", :with => <<-BODY
12 12
 !さて、テストである。
2  spec/acceptance/view_referer_spec.rb
... ...
@@ -1,7 +1,7 @@
1 1
 # -*- coding: utf-8 -*-
2 2
 require 'acceptance_helper'
3 3
 
4  
-feature 'リンク元の表示', :mechanize => true do
  4
+feature 'リンク元の表示', :exclude_mechanize => true do
5 5
 	scenario '日表示にリンク元が表示されている' do
6 6
 		append_default_diary
7 7
 		visit '/'
8  spec/acceptance_helper.rb
@@ -46,12 +46,12 @@
46 46
 	when 'webrick'
47 47
 		Capybara.default_driver = :mechanize
48 48
 		Capybara.app_host = 'http://localhost:19292'
49  
-		config.filter_run_excluding :mechanize => true
50  
-		config.filter_run_excluding :secure => true
  49
+		config.filter_run_excluding :exclude_mechanize => true
  50
+		config.filter_run_excluding :exclude_no_secure => true
51 51
 	when 'secure'
52  
-		config.filter_run_excluding :rack => true
  52
+		config.filter_run_excluding :exclude_secure => true
53 53
 	else
54  
-		config.filter_run_excluding :secure => true
  54
+		config.filter_run_excluding :exclude_no_secure => true
55 55
 	end
56 56
 end
57 57
 

0 notes on commit 688f193

Please sign in to comment.
Something went wrong with that request. Please try again.