small updates
This commit is contained in:
parent
e83f5c8492
commit
3b6863a124
|
@ -12,6 +12,8 @@ module SemanticRailsViewHelpers
|
|||
@options[:class] ||= ''
|
||||
@options[:class] << ' attributes table'
|
||||
|
||||
@options.merge!(@context.send(:semantic_model_data, @object))
|
||||
|
||||
@context.content_tag(:table, @options) do
|
||||
@context.capture(self, &@block)
|
||||
end
|
||||
|
|
|
@ -24,7 +24,7 @@ def find_first(search)
|
|||
omatch = Capybara.match
|
||||
Capybara.match = :first
|
||||
result = find(search)
|
||||
Capybara.match = omatch
|
||||
Capybara.match = omatch
|
||||
result
|
||||
end
|
||||
|
||||
|
@ -178,15 +178,18 @@ def within_any(search, &block)
|
|||
|
||||
raise Capybara::ElementNotFound if nodes.empty?
|
||||
|
||||
exceptions = []
|
||||
|
||||
nodes.each_with_index do |node, index|
|
||||
begin
|
||||
within("#{search}:nth-child(#{index + 1})", &block)
|
||||
return true
|
||||
rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound
|
||||
rescue RSpec::Expectations::ExpectationNotMetError, Capybara::ElementNotFound => e
|
||||
exceptions << e
|
||||
end
|
||||
end
|
||||
|
||||
false
|
||||
raise exceptions.last
|
||||
end
|
||||
|
||||
def refind_object(object)
|
||||
|
|
Loading…
Reference in New Issue