This file contains 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
# browser_logging.rb will print out the browser log from Chrome | |
# when running specs with "js: true". This is so we can easily debug | |
# issues where there are JS errors or other console warnings/error(s), etc. | |
# | |
# Output file is: Rails.root/log/browser.log | |
# | |
# Note: Nothing will be printed out for non-JS examples. | |
RSpec.configure do |config| | |
browser_log = File.new(Rails.root.join("log/browser.log").to_s, "w") | |
browser_log.sync = true |
This file contains 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 Dog | |
attr_writer :name | |
def initialize(name) | |
@name = name | |
end | |
def bark | |
puts "patrick" | |
end |