Sha256: 2bdc3c7463dedb931de9837b95b5d86b37f6d50475e4435a552c38aa68c62a68
Contents?: true
Size: 1.32 KB
Versions: 6
Compression:
Stored size: 1.32 KB
Contents
#--- # Excerpted from "Scripted GUI Testing With Ruby", # published by The Pragmatic Bookshelf. # Copyrights apply to this code. It may not be used to create training material, # courses, books, articles, and the like. Contact us if you are in doubt. # We make no guarantees that this code is fit for any purpose. # Visit http://www.pragmaticprogrammer.com/titles/idgtr for more book information. #--- describe 'a new document', :shared => true do #(1) before do #(2) @note = Note.open end after do #(3) @note.exit! if @note.running? #(4) end end describe 'a saved document', :shared => true do before do Note.fixture 'SavedNote' #(5) end end describe 'a reopened document', :shared => true do before do @note = Note.open 'SavedNote' end after do @note.exit! if @note.running? end end describe 'a searchable document', :shared => true do before do @example = 'The longest island is Isabel Island.' @term = 'Is' @first_match = @example.index(/Is/i) @second_match = @example.index(/Is/i, @first_match + 1) @reverse_match = @example.rindex(/Is/i) @word_match = @example.index(/Is\b/i) @case_match = @example.index(/Is/) @note.text = @example end end
Version data entries
6 entries across 6 versions & 1 rubygems