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
200
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
56
Aprendizados de um projeto Elixir OTP
amandasposito
4
500
SOLID - Dependency inversion principle
amandasposito
0
66
Como concorrência funciona em Elixir?
amandasposito
1
210
Programação Funcional & Elixir
amandasposito
3
110
Ecto, você sabe o que é ?
amandasposito
4
230
Novidades no Rails 5
amandasposito
0
93
Elixir e Phoenix
amandasposito
3
550
Elixir em 5 minutos
amandasposito
1
84
Other Decks in Technology
See All in Technology
Change Managerを活用して本番環境へのセキュアなGUIアクセスを統制する / Control Secure GUI Access to the Production Environment with Change Manager
yuj1osm
0
110
Platform Engineeringで クラウドの「楽しくない」を解消しよう
jacopen
4
110
AWS Well-Architected Frameworkで学ぶAmazon ECSのセキュリティ対策
umekou
2
150
Oracle Database Technology Night #87-1 : Exadata Database Service on Exascale Infrastructure(ExaDB-XS)サービス詳細
oracle4engineer
PRO
1
210
実は強い 非ViTな画像認識モデル
tattaka
3
1.4k
AI Agent時代なのでAWSのLLMs.txtが欲しい!
watany
3
340
手を動かしてレベルアップしよう!
maruto
0
240
エンジニア主導の企画立案を可能にする組織とは?
recruitengineers
PRO
1
270
2/18 Making Security Scale: メルカリが考えるセキュリティ戦略 - Coincheck x LayerX x Mercari
jsonf
0
240
AIエージェント元年@日本生成AIユーザ会
shukob
1
240
30→150人のエンジニア組織拡大に伴うアジャイル文化を醸成する役割と取り組みの変化
nagata03
0
200
Snowflake ML モデルを dbt データパイプラインに組み込む
estie
0
110
Featured
See All Featured
Become a Pro
speakerdeck
PRO
26
5.2k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
430
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Done Done
chrislema
182
16k
GraphQLの誤解/rethinking-graphql
sonatard
69
10k
The Invisible Side of Design
smashingmag
299
50k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
RailsConf 2023
tenderlove
29
1k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Adopting Sorbet at Scale
ufuk
75
9.2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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