Created
October 15, 2015 03:23
-
-
Save ch1ago/ae63b7a56d761c1cbaaa to your computer and use it in GitHub Desktop.
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 'spec_helper' | |
# old code | |
# RSpec.describe "Feature 1" do | |
# | |
# end | |
# new code | |
Foo.rspec_describe "Feature 1", __PATH__ do | |
# | |
end |
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
module Foo | |
class << self | |
def rspec_describe(string, file, &block) | |
# I want to get the path of the current spec, but how? | |
# I want to get the path of the current spec, but how? | |
# I want to get the path of the current spec, but how? | |
puts "I am running on file #{file}" | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment