summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-10 18:07:50 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-10 18:25:15 -0400
commit775418918782d5284000ed0bfea364458c748567 (patch)
treec31e3633a3bcbed17b000f0165cf35edad41f7ca /spec/support
parent1413c23c502d5a5cbc9b81f553a245103c1d6e50 (diff)
downloadgitlab-ce-775418918782d5284000ed0bfea364458c748567.tar.gz
Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/login.rb18
-rw-r--r--spec/support/valid_commit.rb2
2 files changed, 10 insertions, 10 deletions
diff --git a/spec/support/login.rb b/spec/support/login.rb
index 026e336df58..78a907bad0b 100644
--- a/spec/support/login.rb
+++ b/spec/support/login.rb
@@ -1,10 +1,10 @@
module LoginMacros
def login_as role
- @user = User.create(:email => "user#{User.count}@mail.com",
- :name => "John Smith",
- :password => "123456",
- :password_confirmation => "123456",
- :skype => 'user_skype')
+ @user = User.create(email: "user#{User.count}@mail.com",
+ name: "John Smith",
+ password: "123456",
+ password_confirmation: "123456",
+ skype: 'user_skype')
if role == :admin
@user.admin = true
@@ -12,15 +12,15 @@ module LoginMacros
end
visit new_user_session_path
- fill_in "user_email", :with => @user.email
- fill_in "user_password", :with => "123456"
+ fill_in "user_email", with: @user.email
+ fill_in "user_password", with: "123456"
click_button "Sign in"
end
def login_with(user)
visit new_user_session_path
- fill_in "user_email", :with => user.email
- fill_in "user_password", :with => "123456"
+ fill_in "user_email", with: user.email
+ fill_in "user_password", with: "123456"
click_button "Sign in"
end
diff --git a/spec/support/valid_commit.rb b/spec/support/valid_commit.rb
index 8094b679e99..0af36e34293 100644
--- a/spec/support/valid_commit.rb
+++ b/spec/support/valid_commit.rb
@@ -9,7 +9,7 @@ module ValidCommit
C_FILE_PATH = "app/models"
C_FILES = [".gitkeep", "ability.rb", "commit.rb", "issue.rb", "key.rb", "mailer_observer.rb", "merge_request.rb", "note.rb", "project.rb", "protected_branch.rb", "repository.rb", "snippet.rb", "tree.rb", "user.rb", "users_project.rb", "web_hook.rb", "wiki.rb"]
- BLOB_FILE = %{%h3= @key.title\n%hr\n%pre= @key.key\n.actions\n = link_to 'Remove', @key, :confirm => 'Are you sure?', :method => :delete, :class => \"btn danger delete-key\"\n\n\n}
+ BLOB_FILE = %{%h3= @key.title\n%hr\n%pre= @key.key\n.actions\n = link_to 'Remove', @key, confirm: 'Are you sure?', method: :delete, class: \"btn danger delete-key\"\n\n\n}
BLOB_FILE_PATH = "app/views/keys/show.html.haml"
end