This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
get '/image' do | |
<<-HTML | |
<html> | |
<head> | |
<title>new Image Test</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'sinatra' | |
get '/ga' do | |
<<-HTML | |
<html> | |
<head> | |
<title>Google Analytics Test</title> | |
</head> | |
<body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Capybara::Driver::Zombie it should behave like driver with javascript support#drag_to should drag and drop an object | |
Failure/Error: @driver.find('//div[contains(., "Dropped!")]').should_not be_empty | |
expected empty? to return false, got true | |
# /opt/local/lib/ruby/gems/1.8/gems/rspec-expectations-2.4.0/lib/rspec/expectations/fail_with.rb:29:in `fail_with' | |
# /opt/local/lib/ruby/gems/1.8/gems/rspec-expectations-2.4.0/lib/rspec/expectations/handler.rb:44:in `handle_matcher' | |
# /opt/local/lib/ruby/gems/1.8/gems/rspec-expectations-2.4.0/lib/rspec/expectations/extensions/kernel.rb:50:in `should_not' | |
# /opt/local/lib/ruby/gems/1.8/gems/capybara-0.4.0/lib/capybara/spec/driver.rb:93 | |
jQuery draggable.start and draggable.stop events are fired. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@query = params[:query] | |
pretty_keywords = [] | |
index_keywords = [] | |
Pericope.split(@query, /[\r\n,;]/).each do |keyword| | |
if keyword.is_a?(Pericope) | |
pretty_keywords << keyword.to_s | |
index_keywords << "(#{keyword.to_a.join(" | ")})" | |
else | |
keyword = keyword.strip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dir | |
def Dir.glob_in(path, *args) | |
original_dir = Dir.pwd | |
begin | |
Dir.chdir(path) | |
return Dir.glob(*args) | |
ensure | |
Dir.chdir(original_dir) | |
end |
NewerOlder