Sha256: af1f88648ca1c20cd08b7c498082748dd68c262e3578cca594cd2963018e62eb

Contents?: true

Size: 1.26 KB

Versions: 17

Compression:

Stored size: 1.26 KB

Contents

# -*- coding: utf-8 -*-

module HelperMethods
	def append_default_diary(ymd = Date.today.to_s)
		date = Date.parse(ymd)
		visit '/update.rb'
		fill_in "year", :with => date.year
		fill_in "month", :with => date.month
		fill_in "day", :with => date.day
		fill_in "title", :with => "tDiaryのテスト"
		fill_in "body", :with => <<-BODY
!さて、テストである。
とりあえず自前の環境ではちゃんと動いているが、きっと穴がいっぱいあるに違いない:-P
BODY
		click_button "追記"
	end

	def append_default_comment(ymd = Date.today.to_s)
		visit "/"
		date = Date.parse(ymd).strftime('%Y年%m月%d日')
		page.find('h2', :text => date).click_link date
		click_link 'ツッコミを入れる'
		fill_in "name", :with => "alpha"
		fill_in "body", :with => 'こんにちは!こんにちは!'
		click_button '投稿'
	end

	def enable_plugin(name)
		visit '/update.rb?conf=sp'
		check "sp.#{name}.rb"
		page.all('div.saveconf').first.click_button 'OK'
	end

	def disable_plugin(name)
		visit '/update.rb?conf=sp'
		uncheck "sp.#{name}.rb"
		page.all('div.saveconf').first.click_button 'OK'
	end
end

RSpec.configuration.include(HelperMethods)

# Local Variables:
# mode: ruby
# indent-tabs-mode: t
# tab-width: 3
# ruby-indent-level: 3
# End:
# vim: ts=3

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
tdiary-4.0.2 spec/acceptance/support/helpers.rb
tdiary-4.0.1.20131102 spec/acceptance/support/helpers.rb
tdiary-4.0.1.20130929 spec/acceptance/support/helpers.rb
tdiary-4.0.1.20130903 spec/acceptance/support/helpers.rb
tdiary-4.0.1 spec/acceptance/support/helpers.rb
tdiary-4.0.0.20130826 spec/acceptance/support/helpers.rb
tdiary-4.0.0 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130727 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130722 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130720 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130617 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130614 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130604 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130527 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130518 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130508 spec/acceptance/support/helpers.rb
tdiary-3.2.2.20130507 spec/acceptance/support/helpers.rb