Sha256: bba6250829911fb18970148751f2cc40346509e16675b099cb41e0d2e5d4bac4
Contents?: true
Size: 825 Bytes
Versions: 9
Compression:
Stored size: 825 Bytes
Contents
require "hanami" RSpec.describe "App view / Context / Inflector", :app_integration do before do module TestApp class App < Hanami::App end end Hanami.prepare module TestApp module Views class Context < Hanami::View::Context end end end end let(:context_class) { TestApp::Views::Context } subject(:context) { context_class.new } describe "#inflector" do it "is the app inflector by default" do expect(context.inflector).to be TestApp::App.inflector end context "injected inflector" do subject(:context) { context_class.new(inflector: inflector) } let(:inflector) { double(:inflector) } it "is the injected inflector" do expect(context.inflector).to be inflector end end end end
Version data entries
9 entries across 9 versions & 1 rubygems