Skip to content

Instantly share code, notes, and snippets.

@ch1ago
Created October 15, 2015 03:23
Show Gist options
  • Save ch1ago/ae63b7a56d761c1cbaaa to your computer and use it in GitHub Desktop.
Save ch1ago/ae63b7a56d761c1cbaaa to your computer and use it in GitHub Desktop.
require 'spec_helper'
# old code
# RSpec.describe "Feature 1" do
#
# end
# new code
Foo.rspec_describe "Feature 1", __PATH__ do
#
end
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