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
# dependencies are generated using a strict version, don't forget to edit the dependency versions when upgrading. | |
merb_gems_version = "1.0.8.1" | |
# For more information about each component, please read http://wiki.merbivore.com/faqs/merb_components | |
dependency "merb-action-args", merb_gems_version | |
dependency "merb-assets", merb_gems_version | |
dependency "merb-cache", merb_gems_version | |
dependency "merb-helpers", merb_gems_version | |
dependency "merb-mailer", merb_gems_version | |
dependency "merb-slices", merb_gems_version |
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
#!/usr/bin/env ruby | |
# | |
# This file was generated by RubyGems. | |
# | |
# The application 'cucumber' is installed as part of a gem, and | |
# this file is here to facilitate running it. | |
# | |
require 'rubygems' | |
$:.unshift 'vendor/gems/cucumber-0.1.6/lib' |
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
class ThingsController < ApplicationController | |
class UnRescuedError < StandardError; end | |
class RescuedError < StandardError; end | |
rescue_from RescuedError do |exception| | |
#no-op | |
end | |
def action_that_raises_rescued_error | |
raise RescuedError |
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 File.dirname(__FILE__) + '/../../../spec_helper' | |
require 'controller_spec_controller' | |
['integration', 'isolation'].each do |mode| | |
describe "A controller example running in #{mode} mode", :type => :controller do | |
controller_name :controller_spec | |
integrate_views if mode == 'integration' | |
describe "with an error that is not rescued in the controller" do | |
context "without rails' error handling" do |
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
<%=h status %> | |
<% content_for :footer %> | |
<%=h footer %> | |
<% 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
_rspec_opts = _ruby_opts.dup | |
_rspec_opts.delete(:aka) | |
_rspec_opts[:keywords].concat %w{ | |
context describe example it share_as shared_examples_for | |
simple_matcher specify | |
} | |
FORMATTERS.for('rspec', _rspec_opts) | |
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
Spec::Matchers.create :be_a_multiple_of do |actual, expected| | |
match do | |
actual % expected == 0 | |
end | |
end | |
describe 15 do | |
it { should be_a_multiple_of(5) } | |
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
class Thing < ActiveRecord::Base | |
validates_presence_of :name | |
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
describe ProjectsController do | |
describe :get => :show, :id => '37' do | |
expects :find, :on => Project, :with => { :id => '37' }, :returns => mock_project | |
assigns :project | |
describe "mime XML" do | |
mime Mime::XML | |
# | |
end | |
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
describe Admin::BaseController do | |
subject do | |
klass = Class.new(Admin::BaseController) {def index; end} | |
self.class.const_set(generate_name, klass) | |
klass.new | |
end | |
end |