Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rails Engines & RSpec
Search
Amanda
January 21, 2016
Technology
0
230
Rails Engines & RSpec
Amanda
January 21, 2016
Tweet
Share
More Decks by Amanda
See All by Amanda
Lessons Learned From an Elixir OTP Project
amandasposito
2
81
Aprendizados de um projeto Elixir OTP
amandasposito
4
590
SOLID - Dependency inversion principle
amandasposito
0
81
Como concorrência funciona em Elixir?
amandasposito
1
230
Programação Funcional & Elixir
amandasposito
3
130
Ecto, você sabe o que é ?
amandasposito
4
240
Novidades no Rails 5
amandasposito
0
99
Elixir e Phoenix
amandasposito
3
570
Elixir em 5 minutos
amandasposito
1
93
Other Decks in Technology
See All in Technology
Oracle Cloud Infrastructure:2025年12月度サービス・アップデート
oracle4engineer
PRO
0
170
技術選定、下から見るか?横から見るか?
masakiokuda
0
170
松尾研LLM講座2025 応用編Day3「軽量化」 講義資料
aratako
15
4.8k
Everything As Code
yosuke_ai
0
470
2025年のデザインシステムとAI 活用を振り返る
leveragestech
0
650
あの夜、私たちは「人間」に戻った。 ── 災害ユートピア、贈与、そしてアジャイルの再構築 / 20260108 Hiromitsu Akiba
shift_evolve
PRO
0
280
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
290
歴史から学ぶ、Goのメモリ管理基礎
logica0419
3
350
SES向け、生成AI時代におけるエンジニアリングとセキュリティ
longbowxxx
0
280
ESXi のAIOps だ!2025冬
unnowataru
0
470
2025年の医用画像AI/AI×medical_imaging_in_2025_generated_by_AI
tdys13
0
280
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
Featured
See All Featured
Making the Leap to Tech Lead
cromwellryan
135
9.7k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
37
How to make the Groovebox
asonas
2
1.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
7.9k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
220
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
240
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
200
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Designing Powerful Visuals for Engaging Learning
tmiket
0
190
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
WENDY [Excerpt]
tessaabrams
9
35k
Transcript
Rails Engines e RSpec
“Engines can be considered miniature applications that provide functionality to
their host applications. “ http://guides.rubyonrails.org/engines.html
Ruby Gem + MVC “A Rails application is actually just
a ‘supercharged’ engine”
None
É uma maneira de organizar e compartilhar código reutilizável através
de uma ou mais aplicações.
Core Modulo Financeiro Modulo Logística
Redundância Melhor manutenção
Trade-offs
Criando uma Rails Engine do Zero
Nome da nossa engine Sem os arquivos do Test::Unit Plugin
isolado por namespace Cria com uma estrutura padrão com a dummy application especificada
Dummy Application Quando geramos a engine, a partir da linha
de comando, existe uma pequena aplicação dentro do diretório de testes.
None
Ela existe básicamente por que não existe um jeito de
se testar uma Rails Engine fora de uma aplicação Rails
.gemspec
As dependências devem ser adicionadas nesse arquivo para evitar conflitos
na hora de plugar a engine
None
rails generate rspec:install
Obrigada!
Referências https://medium.com/@amandasposito/rails-engines-e-rspec-6e7a8645dc5b#.nemad0vpz http://rspec.info/ http://guides.rubyonrails.org/engines.html https://www.bignerdranch.com/blog/intro-to-rails-engines/ http://stackoverflow.com/questions/6118905/rails-3-1-engine-vs-mountable-app