[logaling-commit] logaling/logaling-server [master] Add feature file for adding project

Back to archive index

SHIMADA Koji null+****@clear*****
Wed Aug 22 23:38:44 JST 2012


SHIMADA Koji	2012-08-22 23:38:44 +0900 (Wed, 22 Aug 2012)

  New Revision: ca832e661b64e64b05d8c8e866439d6aa4bcccdb
  https://github.com/logaling/logaling-server/commit/ca832e661b64e64b05d8c8e866439d6aa4bcccdb

  Log:
    Add feature file for adding project

  Added files:
    features/add_project.feature
    features/step_definitions/project_steps.rb

  Added: features/add_project.feature (+11 -0) 100644
===================================================================
--- /dev/null
+++ features/add_project.feature    2012-08-22 23:38:44 +0900 (482a39e)
@@ -0,0 +1,11 @@
+#language: ja
+
+フィーチャ: .logaling を持つ github 上の翻訳プロジェクトを登録したい
+  .logaling を持つ github 上の翻訳プロジェクトに参加している翻訳者として
+  プロジェクトを登録したい
+  なぜなら、ブラウザからでも訳語を検索したいからだ
+
+  シナリオ: .logaling を持つ github プロジェクトを登録できる
+    前提   プロジェクト登録画面を表示する
+    もし   "logaling"ユーザの"logaling-server"プロジェクトを登録する
+    ならば "logaling"ユーザの"logaling-server"プロジェクトが登録済みであること

  Added: features/step_definitions/project_steps.rb (+20 -0) 100644
===================================================================
--- /dev/null
+++ features/step_definitions/project_steps.rb    2012-08-22 23:38:44 +0900 (9728e2f)
@@ -0,0 +1,20 @@
+#coding: utf-8
+
+前提 /^トップページを表示している$/ do
+  visit '/'
+end
+
+前提 /^プロジェクト登録画面を表示する$/ do
+  visit '/github/new'
+end
+
+もし /^"([^"]*)"ユーザの"([^"]*)"プロジェクトを登録する$/ do |owner, project|
+  fill_in 'github_project_owner', with: owner
+  fill_in 'github_project_name', with: project
+  click_on 'Save'
+end
+
+ならば /^"([^"]*)"ユーザの"([^"]*)"プロジェクトが登録済みであること$/ do |owner, project|
+  visit "/github/#{owner}/#{project}"
+  page.should have_content(project)
+end
-------------- next part --------------
An HTML attachment was scrubbed...
Download 



More information about the logaling-commit mailing list
Back to archive index