Sha256: a5ebe6dee59c6cf197e0a16e9e5e42028e96f8ca47279c7d67253edb06001ba3
Contents?: true
Size: 1.07 KB
Versions: 1
Compression:
Stored size: 1.07 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe "Custom Macros" do before(:all) do custom_macro = File.join(RAILS_ROOT, "spec", "remarkable_macros", "run_my_custom_macro.rb") plugin_macro = File.join(RAILS_ROOT, "vendor", "plugins", "my_plugin", "remarkable_macros", "run_my_plugin_macro.rb") [custom_macro, plugin_macro].each do |macro_file| File.open(macro_file, "w") do |f| f.puts("it 'should run my macro' do\t true.should be_true\tend") end end load File.expand_path(File.dirname(__FILE__) + '/../../lib/remarkable/rails.rb') end it { self.class.should respond_to(:should_run_my_custom_macro) } it { should run_my_custom_macro } it { self.class.should respond_to(:should_run_my_plugin_macro) } it { should run_my_plugin_macro } after(:all) do FileUtils.rm(File.join(RAILS_ROOT, "spec", "remarkable_macros", "run_my_custom_macro.rb"), :force => true) FileUtils.rm(File.join(RAILS_ROOT, "vendor", "plugins", "my_plugin", "remarkable_macros", "run_my_plugin_macro.rb"), :force => true) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
carlosbrando-remarkable-2.2.1 | spec/other/custom_macros_spec.rb |