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
210
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
63
Aprendizados de um projeto Elixir OTP
amandasposito
4
520
SOLID - Dependency inversion principle
amandasposito
0
70
Como concorrência funciona em Elixir?
amandasposito
1
220
Programação Funcional & Elixir
amandasposito
3
120
Ecto, você sabe o que é ?
amandasposito
4
230
Novidades no Rails 5
amandasposito
0
95
Elixir e Phoenix
amandasposito
3
550
Elixir em 5 minutos
amandasposito
1
87
Other Decks in Technology
See All in Technology
さくらのクラウド開発の裏側
metakoma
PRO
18
5.1k
20250514 1Passwordを使い倒す道場 vol.1
east_takumi
0
120
Tailwind CSS の小話「コンテナークエリーって便利」
yamaday
0
120
大規模サーバーレスプロジェクトのリアルな零れ話
maimyyym
3
230
Global Azure2025(GitHub Copilot ハンズオン)
tomokusaba
2
790
Cursorを全エンジニアに配布 その先に見据えるAI駆動開発の未来 / 2025-05-13-forkwell-ai-study-1-cursor-at-loglass
itohiro73
2
600
ペアーズにおける評価ドリブンな AI Agent 開発のご紹介
fukubaka0825
9
2.7k
LangfuseではじめるAIアプリのLLMトレーシング
codenote
0
180
Terraform にコントリビュートしていたら Azure のコストをやらかした話 / How I Messed Up Azure Costs While Contributing to Terraform
nnstt1
1
520
テストコードにはテストの意図を込めよう(2025年版) #retechtalk / Put the intent of the test 2025
nihonbuson
PRO
9
1.7k
Google Cloud Next 2025 Recap マーケティング施策の運用及び開発を支援するAIの活用 / Use of AI to support operation and development of marketing campaign
atsushiyoshikawa
0
240
dbtとリバースETLでデータ連携の複雑さに立ち向かう
morookacube
0
870
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
271
27k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Fontdeck: Realign not Redesign
paulrobertlloyd
84
5.5k
Writing Fast Ruby
sferik
628
61k
GraphQLとの向き合い方2022年版
quramy
46
14k
VelocityConf: Rendering Performance Case Studies
addyosmani
329
24k
Facilitating Awesome Meetings
lara
54
6.4k
The Invisible Side of Design
smashingmag
299
50k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
10
800
Product Roadmaps are Hard
iamctodd
PRO
53
11k
Docker and Python
trallard
44
3.4k
How to train your dragon (web standard)
notwaldorf
91
6k
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