watir-webdriver 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. data/Rakefile +16 -17
  2. data/VERSION +1 -1
  3. data/lib/watir-webdriver/elements/generated.rb +23 -4
  4. data/lib/watir-webdriver/elements/select.rb +6 -0
  5. data/lib/watir-webdriver/html/spec_extractor.rb +3 -0
  6. data/spec/browser_spec.rb +0 -1
  7. data/spec/container_spec.rb +0 -1
  8. data/spec/element_spec.rb +0 -1
  9. data/spec/implementation.rb +17 -0
  10. data/spec/spec_helper.rb +2 -20
  11. data/spec/watirspec/area_spec.rb +1 -1
  12. data/spec/watirspec/areas_spec.rb +1 -1
  13. data/spec/watirspec/browser_spec.rb +1 -1
  14. data/spec/watirspec/button_spec.rb +1 -1
  15. data/spec/watirspec/buttons_spec.rb +1 -1
  16. data/spec/watirspec/checkbox_spec.rb +1 -1
  17. data/spec/watirspec/checkboxes_spec.rb +1 -1
  18. data/spec/watirspec/collections_spec.rb +1 -1
  19. data/spec/watirspec/dd_spec.rb +1 -1
  20. data/spec/watirspec/dds_spec.rb +1 -1
  21. data/spec/watirspec/del_spec.rb +1 -1
  22. data/spec/watirspec/dels_spec.rb +1 -1
  23. data/spec/watirspec/div_spec.rb +1 -1
  24. data/spec/watirspec/divs_spec.rb +1 -1
  25. data/spec/watirspec/dl_spec.rb +1 -1
  26. data/spec/watirspec/dls_spec.rb +1 -1
  27. data/spec/watirspec/dt_spec.rb +1 -1
  28. data/spec/watirspec/dts_spec.rb +1 -1
  29. data/spec/watirspec/element_spec.rb +2 -2
  30. data/spec/watirspec/em_spec.rb +1 -1
  31. data/spec/watirspec/ems_spec.rb +1 -1
  32. data/spec/watirspec/filefield_spec.rb +1 -1
  33. data/spec/watirspec/filefields_spec.rb +1 -1
  34. data/spec/watirspec/font_spec.rb +1 -1
  35. data/spec/watirspec/form_spec.rb +1 -1
  36. data/spec/watirspec/forms_spec.rb +1 -1
  37. data/spec/watirspec/frame_spec.rb +1 -1
  38. data/spec/watirspec/frames_spec.rb +1 -1
  39. data/spec/watirspec/hidden_spec.rb +1 -1
  40. data/spec/watirspec/hiddens_spec.rb +1 -1
  41. data/spec/watirspec/hn_spec.rb +1 -1
  42. data/spec/watirspec/hns_spec.rb +1 -1
  43. data/spec/watirspec/image_spec.rb +1 -1
  44. data/spec/watirspec/images_spec.rb +1 -1
  45. data/spec/watirspec/ins_spec.rb +1 -1
  46. data/spec/watirspec/inses_spec.rb +1 -1
  47. data/spec/watirspec/label_spec.rb +1 -1
  48. data/spec/watirspec/labels_spec.rb +1 -1
  49. data/spec/watirspec/li_spec.rb +1 -1
  50. data/spec/watirspec/lib/{spec_helper.rb → runner.rb} +12 -8
  51. data/spec/watirspec/lib/server.rb +14 -7
  52. data/spec/watirspec/link_spec.rb +1 -1
  53. data/spec/watirspec/links_spec.rb +1 -1
  54. data/spec/watirspec/lis_spec.rb +1 -1
  55. data/spec/watirspec/map_spec.rb +1 -1
  56. data/spec/watirspec/maps_spec.rb +1 -1
  57. data/spec/watirspec/meta_spec.rb +1 -1
  58. data/spec/watirspec/metas_spec.rb +1 -1
  59. data/spec/watirspec/ol_spec.rb +1 -1
  60. data/spec/watirspec/ols_spec.rb +1 -1
  61. data/spec/watirspec/option_spec.rb +1 -1
  62. data/spec/watirspec/p_spec.rb +1 -1
  63. data/spec/watirspec/pre_spec.rb +1 -1
  64. data/spec/watirspec/pres_spec.rb +1 -1
  65. data/spec/watirspec/ps_spec.rb +1 -1
  66. data/spec/watirspec/radio_spec.rb +1 -1
  67. data/spec/watirspec/radios_spec.rb +1 -1
  68. data/spec/watirspec/select_list_spec.rb +1 -1
  69. data/spec/watirspec/select_lists_spec.rb +1 -1
  70. data/spec/watirspec/span_spec.rb +1 -1
  71. data/spec/watirspec/spans_spec.rb +1 -1
  72. data/spec/watirspec/spec_helper.rb +4 -2
  73. data/spec/watirspec/strong_spec.rb +1 -1
  74. data/spec/watirspec/strongs_spec.rb +1 -1
  75. data/spec/watirspec/table_nesting_spec.rb +1 -1
  76. data/spec/watirspec/table_spec.rb +1 -1
  77. data/spec/watirspec/tables_spec.rb +1 -1
  78. data/spec/watirspec/tbody_spec.rb +1 -1
  79. data/spec/watirspec/tbodys_spec.rb +1 -1
  80. data/spec/watirspec/td_spec.rb +1 -1
  81. data/spec/watirspec/tds_spec.rb +1 -1
  82. data/spec/watirspec/text_field_spec.rb +1 -1
  83. data/spec/watirspec/text_fields_spec.rb +1 -1
  84. data/spec/watirspec/tfoot_spec.rb +1 -1
  85. data/spec/watirspec/tfoots_spec.rb +1 -1
  86. data/spec/watirspec/thead_spec.rb +1 -1
  87. data/spec/watirspec/theads_spec.rb +1 -1
  88. data/spec/watirspec/tr_spec.rb +1 -1
  89. data/spec/watirspec/trs_spec.rb +1 -1
  90. data/spec/watirspec/ul_spec.rb +1 -1
  91. data/spec/watirspec/uls_spec.rb +1 -1
  92. data/spec/watirspec/window_switching_spec.rb +1 -2
  93. data/support/html5.html +5315 -6167
  94. data/watir-webdriver.gemspec +11 -9
  95. metadata +13 -19
data/Rakefile CHANGED
@@ -11,9 +11,9 @@ begin
11
11
  gem.homepage = "http://github.com/jarib/watir-webdriver"
12
12
  gem.authors = ["Jari Bakken"]
13
13
 
14
- gem.add_dependency "selenium-webdriver", '0.0.29'
14
+ gem.add_dependency "selenium-webdriver", '0.1.0'
15
15
 
16
- gem.add_development_dependency "rspec"
16
+ gem.add_development_dependency "rspec", "~> 2.1.0"
17
17
  gem.add_development_dependency "yard", "~> 0.6"
18
18
  gem.add_development_dependency "webidl", ">= 0.0.6"
19
19
  gem.add_development_dependency "sinatra", "~> 1.0"
@@ -26,31 +26,30 @@ rescue LoadError
26
26
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
27
27
  end
28
28
 
29
- require 'spec/rake/spectask'
30
- Spec::Rake::SpecTask.new(:spec) do |spec|
31
- spec.libs << 'lib' << 'spec'
32
- spec.spec_files = FileList['spec/**/*_spec.rb']
29
+ require 'rspec/core/rake_task'
30
+ RSpec::Core::RakeTask.new(:spec) do |spec|
31
+ spec.ruby_opts = "-I lib:spec"
32
+ spec.pattern = 'spec/**/*_spec.rb'
33
33
  end
34
34
 
35
35
  namespace :spec do
36
- Spec::Rake::SpecTask.new(:rcov) do |spec|
37
- spec.libs << 'lib' << 'spec'
38
- spec.pattern = 'spec/**/*_spec.rb'
39
- spec.rcov = true
36
+ RSpec::Core::RakeTask.new(:rcov) do |spec|
37
+ spec.ruby_opts = "-I lib:spec"
38
+ spec.pattern = 'spec/**/*_spec.rb'
39
+ spec.rcov = true
40
40
  spec.rcov_opts = %w[--exclude spec,ruby-debug,/Library/Ruby,.gem --include lib/watir-webdriver]
41
41
  end
42
42
 
43
43
  desc 'Run specs for CI'
44
- Spec::Rake::SpecTask.new(:ci) do |spec|
45
- spec.libs << 'lib' << 'spec'
46
- spec.pattern = 'spec/**/*_spec.rb'
47
- spec.spec_opts = ["--format", "html:results/#{RUBY_PLATFORM}/#{ENV['WATIR_WEBDRIVER_BROWSER'] || 'firefox'}/spec-results.html",
44
+ RSpec::Core::RakeTask.new(:ci) do |spec|
45
+ spec.ruby_opts = "-I lib:spec"
46
+ spec.pattern = 'spec/**/*_spec.rb'
47
+ spec.rspec_opts = ["--format", "html:results/#{RUBY_PLATFORM}/#{ENV['WATIR_WEBDRIVER_BROWSER'] || 'firefox'}/spec-results.html",
48
48
  "--format", "progress",
49
49
  "--backtrace"]
50
- spec.rcov = true
51
- spec.rcov_opts = %w[--exclude spec,ruby-debug,/Library/Ruby,.gem --include lib/watir-webdriver]
50
+ spec.rcov = true
51
+ spec.rcov_opts = %w[--exclude spec,ruby-debug,/Library/Ruby,.gem --include lib/watir-webdriver]
52
52
  end
53
-
54
53
  end
55
54
 
56
55
  task :spec => :check_dependencies
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -38,11 +38,13 @@ module Watir
38
38
 
39
39
 
40
40
 
41
+
42
+
41
43
 
42
44
 
43
45
 
44
46
  class HTMLElement < Element
45
- attributes(:string => [:innerhtml, :outerhtml, :id, :title, :lang, :dir, :class_name, :item_type, :item_id, :item_value, :access_key, :access_key_label, :content_editable, :command_type, :label, :icon], :token_list => [:class_list, :item_ref, :item_prop], :string_map => [:dataset], :bool => [:item_scope, :hidden, :draggable, :is_content_editable, :spellcheck, :disabled, :checked], :properties_collection => [:properties], :int => [:tab_index], :html_element => [:context_menu], :style => [:style], :function => [:onabort, :onblur, :oncanplay, :oncanplaythrough, :onchange, :onclick, :oncontextmenu, :oncuechange, :ondblclick, :ondrag, :ondragend, :ondragenter, :ondragleave, :ondragover, :ondragstart, :ondrop, :ondurationchange, :onemptied, :onended, :onerror, :onfocus, :onformchange, :onforminput, :oninput, :oninvalid, :onkeydown, :onkeypress, :onkeyup, :onload, :onloadeddata, :onloadedmetadata, :onloadstart, :onmousedown, :onmousemove, :onmouseout, :onmouseover, :onmouseup, :onmousewheel, :onpause, :onplay, :onplaying, :onprogress, :onratechange, :onreadystatechange, :onreset, :onscroll, :onseeked, :onseeking, :onselect, :onshow, :onstalled, :onsubmit, :onsuspend, :ontimeupdate, :onvolumechange, :onwaiting])
47
+ attributes(:string => [:innerhtml, :outerhtml, :id, :title, :lang, :dir, :class_name, :item_type, :item_id, :item_value, :access_key, :access_key_label, :content_editable, :command_type, :label, :icon], :token_list => [:class_list, :item_ref, :item_prop, :dropzone], :string_map => [:dataset], :bool => [:item_scope, :hidden, :draggable, :is_content_editable, :spellcheck, :disabled, :checked], :properties_collection => [:properties], :int => [:tab_index], :html_element => [:context_menu], :style => [:style], :function => [:onabort, :onblur, :oncanplay, :oncanplaythrough, :onchange, :onclick, :oncontextmenu, :oncuechange, :ondblclick, :ondrag, :ondragend, :ondragenter, :ondragleave, :ondragover, :ondragstart, :ondrop, :ondurationchange, :onemptied, :onended, :onerror, :onfocus, :onformchange, :onforminput, :oninput, :oninvalid, :onkeydown, :onkeypress, :onkeyup, :onload, :onloadeddata, :onloadedmetadata, :onloadstart, :onmousedown, :onmousemove, :onmouseout, :onmouseover, :onmouseup, :onmousewheel, :onpause, :onplay, :onplaying, :onprogress, :onratechange, :onreadystatechange, :onreset, :onscroll, :onseeked, :onseeking, :onselect, :onshow, :onstalled, :onsubmit, :onsuspend, :ontimeupdate, :onvolumechange, :onwaiting])
46
48
  end
47
49
  class HTMLElementCollection < ElementCollection
48
50
  def element_class
@@ -174,7 +176,7 @@ module Watir
174
176
  end
175
177
  end
176
178
  class TextArea < HTMLElement
177
- attributes(:bool => [:autofocus, :disabled, :read_only, :required, :will_validate], :int => [:cols, :max_length, :rows, :text_length, :selection_start, :selection_end], :html_element => [:form], :string => [:name, :placeholder, :wrap, :type, :default_value, :value, :validity, :validation_message], :list => [:labels])
179
+ attributes(:bool => [:autofocus, :disabled, :read_only, :required, :will_validate], :int => [:cols, :max_length, :rows, :text_length, :selection_start, :selection_end], :string => [:dir_name, :name, :placeholder, :wrap, :type, :default_value, :value, :validity, :validation_message], :html_element => [:form], :list => [:labels])
178
180
  end
179
181
  class TextAreaCollection < ElementCollection
180
182
  def element_class
@@ -222,7 +224,7 @@ module Watir
222
224
  end
223
225
  end
224
226
  class Input < HTMLElement
225
- attributes(:string => [:accept, :alt, :autocomplete, :form_action, :form_enctype, :form_method, :form_target, :height, :max, :min, :name, :pattern, :placeholder, :src, :step, :type, :default_value, :value, :width, :validity, :validation_message], :bool => [:autofocus, :default_checked, :checked, :disabled, :form_no_validate, :indeterminate, :multiple, :read_only, :required, :will_validate], :html_element => [:form, :list, :selected_option], :list => [:files, :labels], :int => [:max_length, :size, :selection_start, :selection_end], :date => [:value_as_date], :float => [:value_as_number])
227
+ attributes(:string => [:accept, :alt, :autocomplete, :dir_name, :form_action, :form_enctype, :form_method, :form_target, :height, :max, :min, :name, :pattern, :placeholder, :src, :step, :type, :default_value, :value, :width, :validity, :validation_message], :bool => [:autofocus, :default_checked, :checked, :disabled, :form_no_validate, :indeterminate, :multiple, :read_only, :required, :will_validate], :html_element => [:form, :list, :selected_option], :list => [:files, :labels], :int => [:max_length, :size, :selection_start, :selection_end], :date => [:value_as_date], :float => [:value_as_number])
226
228
  end
227
229
  class InputCollection < ElementCollection
228
230
  def element_class
@@ -402,7 +404,7 @@ module Watir
402
404
  end
403
405
  end
404
406
  class Video < Media
405
- attributes(:int => [:width, :height, :video_width, :video_height], :string => [:poster])
407
+ attributes(:int => [:width, :height, :video_width, :video_height], :string => [:poster], :token_list => [:audio])
406
408
  end
407
409
  class VideoCollection < ElementCollection
408
410
  def element_class
@@ -909,6 +911,23 @@ module Watir
909
911
  # @return [HTMLElement]
910
912
  #
911
913
 
914
+ def bdi(*args)
915
+ HTMLElement.new(self, extract_selector(args).merge(:tag_name => "bdi"))
916
+ end
917
+
918
+ #
919
+ # @return [HTMLElementCollection]
920
+ #
921
+
922
+ def bdis(*args)
923
+ HTMLElementCollection.new(self, extract_selector(args).merge(:tag_name => "bdi"))
924
+ end
925
+
926
+ Watir.tag_to_class[:bdi] = HTMLElement
927
+ #
928
+ # @return [HTMLElement]
929
+ #
930
+
912
931
  def bdo(*args)
913
932
  HTMLElement.new(self, extract_selector(args).merge(:tag_name => "bdo"))
914
933
  end
@@ -27,6 +27,12 @@ module Watir
27
27
  end
28
28
  end
29
29
 
30
+ #
31
+ # Get all the options in the select list
32
+ #
33
+ # @return [Watir::OptionCollection]
34
+ #
35
+
30
36
  def options
31
37
  assert_exists
32
38
  super
@@ -12,6 +12,9 @@ module Watir
12
12
  extract_idl_parts
13
13
  extract_interface_map
14
14
  build_result
15
+ rescue
16
+ p errors
17
+ raise
15
18
  end
16
19
 
17
20
  def errors
data/spec/browser_spec.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require File.expand_path('watirspec/spec_helper', File.dirname(__FILE__))
2
2
 
3
-
4
3
  describe Watir::Browser do
5
4
 
6
5
  describe ".new" do
@@ -1,6 +1,5 @@
1
1
  require File.expand_path('watirspec/spec_helper', File.dirname(__FILE__))
2
2
 
3
-
4
3
  describe Watir::Container do
5
4
  before { @container = Object.new.extend(Watir::Container) }
6
5
 
data/spec/element_spec.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require File.expand_path('watirspec/spec_helper', File.dirname(__FILE__))
2
2
 
3
-
4
3
  describe Watir::Element do
5
4
 
6
5
  describe "#send_keys" do
@@ -0,0 +1,17 @@
1
+ require File.expand_path("../spec_helper", __FILE__)
2
+
3
+ WatirSpec.implementation do |imp|
4
+ name = :webdriver
5
+ browser = (ENV['WATIR_WEBDRIVER_BROWSER'] || :firefox).to_sym
6
+
7
+ imp.name = name
8
+ imp.browser_class = Watir::Browser
9
+ imp.browser_args = [browser]
10
+
11
+ imp.guard_proc = lambda { |args|
12
+ args.any? { |arg| arg == name || arg == [name, browser] }
13
+ }
14
+ end
15
+
16
+
17
+
data/spec/spec_helper.rb CHANGED
@@ -2,31 +2,13 @@
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
 
5
- require 'rubygems'
6
5
  require 'watir-webdriver'
7
6
  require 'locator_spec_helper'
8
- require 'spec'
9
- require 'spec/autorun'
7
+ require 'rubygems'
8
+ require 'rspec'
10
9
 
11
10
  include Watir
12
11
  include Watir::Exception
13
12
 
14
13
  WEBDRIVER_SELECTORS = [:class, :class_name, :css, :id, :name, :tag_name, :xpath]
15
14
 
16
- if defined?(WatirSpec)
17
- browser = (ENV['WATIR_WEBDRIVER_BROWSER'] || :firefox).to_sym
18
-
19
- WatirSpec.implementation do |imp|
20
- imp.name = :webdriver
21
- imp.browser_class = Watir::Browser
22
- imp.browser_args = [browser]
23
-
24
- imp.guard_proc = lambda { |args|
25
- args.any? { |arg| arg == :webdriver || arg == [:webdriver, browser] }
26
- }
27
- end
28
-
29
- # WatirSpec.unguarded = true
30
- end
31
-
32
-
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Area" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Areas" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Browser" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Button" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Buttons" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "CheckBox" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "CheckBoxes" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Collections" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Dd" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Dds" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Del" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Dels" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Div" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Divs" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Dl" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Dls" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Dt" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Dts" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Element" do
5
5
 
@@ -18,7 +18,7 @@ describe "Element" do
18
18
  end
19
19
 
20
20
  it "raises ArgumentError if given the wrong number of arguments" do
21
- container = mock("container", :null_object => true)
21
+ container = mock("container").as_null_object
22
22
  lambda { Element.new(container, 1,2,3,4) }.should raise_error(ArgumentError)
23
23
  lambda { Element.new(container, "foo") }.should raise_error(ArgumentError)
24
24
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Em" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Ems" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "FileField" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "FileFields" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Font" do
5
5
 
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require File.expand_path('spec_helper', File.dirname(__FILE__))
2
+ require File.expand_path("../spec_helper", __FILE__)
3
3
 
4
4
  describe "Form" do
5
5