Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-06-22 21:52:41 +0300
committerRobert Speicher <rspeicher@gmail.com>2015-06-22 21:52:41 +0300
commit4dbf118a16c7d687894d441d2f2e6165cd0be384 (patch)
treedacad90db8c80870c873afd8eb4c524a29ec774e /spec/support
parent0716a559b5d50fb31a78f6fb68890dacf8940dc9 (diff)
Fix Style/Not cop violations
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/select2_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/select2_helper.rb b/spec/support/select2_helper.rb
index 691f84f39d4..04d25b5e9e9 100644
--- a/spec/support/select2_helper.rb
+++ b/spec/support/select2_helper.rb
@@ -12,9 +12,9 @@
module Select2Helper
def select2(value, options={})
- raise "Must pass a hash containing 'from'" if not options.is_a?(Hash) or not options.has_key?(:from)
+ raise ArgumentError, 'options must be a Hash' unless options.kind_of?(Hash)
- selector = options[:from]
+ selector = options.fetch(:from)
if options[:multiple]
execute_script("$('#{selector}').select2('val', ['#{value}'], true);")